David B�langer | 1 Jun 2012 02:54
Picon

Re: PostGis Raster and GDAL 1.9

Hi Jorge,
Did you receive my email with the files requested? I used an other adresse to send you the files.

David

> From: jorgearevalo <at> libregis.org
> Date: Mon, 28 May 2012 10:07:09 +0200
> To: postgis-users <at> postgis.refractions.net
> Subject: Re: [postgis-users] PostGis Raster and GDAL 1.9
>
> Hi,
>
> David, could you please attach the original files? Seems to be a
> problem with the way the driver gets the origin of the raster
> coverage, yes.
>
> The code in GDAL trunk is under development. Slowness problem is one
> of the reasons.
>
> Best regards,
> Jorge
>
> On Tue, May 22, 2012 at 7:01 PM, David B�langer <belanger_david <at> live.ca> wrote:
> > Hi,
> > I did tests and all gave the result expected. It seem to be a problem with
> > the origin of the result file (see attached file). The application has taken
> > the origin of the file 056n05_0100_deme.tif instead of the origin of the
> > file 056n05_0100_demw.tif. What do you think ?
> >
> > For your information the files are in geographic coordinate system.
> >
> > David
> >
> >> From: Pierre.Racine <at> sbf.ulaval.ca
> >> To: postgis-users <at> postgis.refractions.net
> >> Date: Tue, 22 May 2012 11:37:03 -0400
> >
> >> Subject: Re: [postgis-users] PostGis Raster and GDAL 1.9
> >>
> >> I would maybe do some tests:
> >>
> >> 1) Remove the -a_nodata "-32767" parameter. Why did you have to set it? Is
> >> the nodata set properly in PostGIS for all rows?
> >>
> >> 2) Extract one file at a time with mode=2 and then with mode=1
> >>
> >> Pierre
> >>
> >> > -----Original Message-----
> >> > From: postgis-users-bounces <at> postgis.refractions.net
> >> > [mailto:postgis-users-
> >> > bounces <at> postgis.refractions.net] On Behalf Of David B?langer
> >> > Sent: Tuesday, May 22, 2012 10:25 AM
> >> > To: postgis-users <at> postgis.refractions.net
> >> > Subject: Re: [postgis-users] PostGis Raster and GDAL 1.9
> >> >
> >> > Hi Pierre,
> >> > Yes I have a unique rid (Integer) with sequential number. I used the
> >> > tool
> >> > raster2pgsql.exe to upload the data in the database. I uploaded 2 files
> >> >
> >> > 056n05_0100_deme.tif
> >> > 056n05_0100_demw.tif
> >> >
> >> > "C:\Program Files\PostgreSQL\9.1\bin\raster2pgsql.exe" -I -e -Y -F -s
> >> > 4269
> >> > e:\dir\*.tif dbelange.elevationTest | "psql.exe" -U myuser -d myDB -h
> >> > myhost -p
> >> > 14070
> >> >
> >> > I used this command to extract data:
> >> > "C:\Program Files\GDAL\gdal_translate" -a_nodata "-32767" -of GTIFF
> >> > "PG:host=myhost port=14070 dbname='myDB' user='myuser'
> >> > password='mypassword' schema='dbelange' table='elevationTest' mode=2
> >> > where=\"filename LIKE \'%056n05%\'\" " 056N05_testGDAL1.9.tif
> >> >
> >> > Like I said it’s working very well with gdal 1.8
> >> >
> >> > I can send you the 2 files If you want to try on your side.
> >> >
> >> > Do you have another idea?
> >> >
> >> > David
> >> >
> >> >
> >> > > From: Pierre.Racine <at> sbf.ulaval.ca
> >> > > To: postgis-users <at> postgis.refractions.net
> >> > > Date: Sat, 19 May 2012 13:55:47 -0400
> >> > > Subject: Re: [postgis-users] PostGis Raster and GDAL 1.9
> >> > >
> >> > > Hi David,
> >> > >
> >> > > Do you have a "rid" column in your table with unique values?
> >> > >
> >> > > Pierre
> >> > >
> >> > > > -----Original Message-----
> >> > > > From: postgis-users-bounces <at> postgis.refractions.net
> >> > > > [mailto:postgis-users-
> >> > > > bounces <at> postgis.refractions.net] On Behalf Of David B?langer
> >> > > > Sent: Thursday, May 17, 2012 8:13 PM
> >> > > > To: postgis-users <at> postgis.refractions.net
> >> > > > Subject: [postgis-users] PostGis Raster and GDAL 1.9
> >> > > >
> >> > > > Hi,
> >> > > > I stored DEM raster data in PostGIS 2.0 and I used gdal_translate
> >> > > > (with
> >> > mode=2)
> >> > > > to extract a mosaic of tiles. When I’m using GDAL 1.8 is working but
> >> > > > when
> >> > I’m
> >> > > > using GDAL 1.9 I can see the values of pixel for just one tile. For
> >> > > > example I
> >> > > > uploaded in the database a tile with an attribute filename=056n05_w
> >> > > > and an
> >> > > > other tile with an filename=056n05_e and I executed the command with
> >> > GDAL
> >> > > > 1.8 and GDAL 1.9:
> >> > > >
> >> > > > gdal_translate" -a_nodata "-32767" -of GTIFF "PG:host=myhost
> >> > > > port=14070
> >> > > > dbname='mybd' user='myuser' password='mypassword'
> >> > > > schema='myschema'table='Elevation' mode=2 where=\"filename LIKE
> >> > > > \'%056n05%\'\" " 056N05.tif
> >> > > >
> >> > > > With GDAL 1.8 I obtained a mosaic of 2 tiles (the result expected)
> >> > > > but with
> >> > GDAL
> >> > > > 1.9, I obtained a raster with the same extent but only the values of
> >> > > > the tile
> >> > > > 056n05_w are present. The pixels of the tile 056n05_w have a value
> >> > > > 0.
> >> > > >
> >> > > > I tried the stable version 1.9 MSVC2008 (Win32) and development
> >> > > > version
> >> > > > available today at http://www.gisinternals.com/sdk/
> >> > > >
> >> > <https://email.nrcan.gc.ca/owa/redir.aspx?C=OzXx4wlk90m3TV7W8fzG7_FxObj
> >> > > >
> >> > PB88I1bAwXOtZColSmDyhIvj_1yhbCVJUJ0vrnCWWTuivB9Y.&URL=http://www.g
> >> > > > isinternals.com/sdk/> and I have still the same problem. For your
> >> > information,
> >> > > > I'm running GDAL on windows7 and PostGIS 2.0 is installed on a Linux
> >> > > > server.
> >> > I
> >> > > > tried many version of GDAL 1.9 and I always have the same problem.
> >> > > > The
> >> > version
> >> > > > 1.8 is working very well but I would like to take advantage of the
> >> > improvements
> >> > > > in the last version because I'm working on a project where
> >> > > > processing time is
> >> > > > very important.
> >> > > >
> >> > > > Does anybody have any idea about this problem ?
> >> > > >
> >> > > > Thanks
> >> > > >
> >> > > > David Bélanger
> >> > >
> >> > > _______________________________________________
> >> > > postgis-users mailing list
> >> > > postgis-users <at> postgis.refractions.net
> >> > > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >>
> >> _______________________________________________
> >> postgis-users mailing list
> >> postgis-users <at> postgis.refractions.net
> >> http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users <at> postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
>
>
>
> --
> Jorge Arevalo
> http://www.libregis.org
> _______________________________________________
> postgis-users mailing list
> postgis-users <at> postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
Ahmad Aburizaiza | 1 Jun 2012 08:18
Picon

PostGIS through xCode

Hello all,

I am trying to build an iPhone app with a Google Map to display data stored on a remote PostGIS database. Anyone had such an experience. I need to know how to connect to the database so I can query the data.

Thanx in advance
---------------------------------------------------------------------------
Ahmad Aburizaiza
PhD student at George Mason University
Geography and Geoinformation Science Department
Fairfax, VA, USA
Tel : +1-703-981-0354

_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
Charles Galpin | 1 Jun 2012 13:24
Favicon

Re: PostGIS through xCode

Hi Ahmad

You won't connect to the database directly. Depending on what the data is you can use a variety of methods. Simple REST style calls to a web server which runs code to query the database and return the data could be sufficient, but for anything more complex I suggest using a WMS server like geoserver or mapserver.

If you want your app to run on multiple platforms consider doing it in html 5.

hth
charles

On Jun 1, 2012, at 2:18 AM, Ahmad Aburizaiza wrote:

Hello all,

I am trying to build an iPhone app with a Google Map to display data stored on a remote PostGIS database. Anyone had such an experience. I need to know how to connect to the database so I can query the data.

Thanx in advance
---------------------------------------------------------------------------
Ahmad Aburizaiza
PhD student at George Mason University
Geography and Geoinformation Science Department
Fairfax, VA, USA
Tel : +1-703-981-0354

_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
chris mollis | 1 Jun 2012 13:30
Picon

Re: PostGIS through xCode

Right.. using REST calls is the way to do that.   You'll basically need to do any complex geo queries/functions in PostGIS and then return vectors of lon/lat points which you then display with the MapKit apis.

On Fri, Jun 1, 2012 at 7:24 AM, Charles Galpin <cgalpin <at> lhsw.com> wrote:
Hi Ahmad

You won't connect to the database directly. Depending on what the data is you can use a variety of methods. Simple REST style calls to a web server which runs code to query the database and return the data could be sufficient, but for anything more complex I suggest using a WMS server like geoserver or mapserver.

If you want your app to run on multiple platforms consider doing it in html 5.

hth
charles

On Jun 1, 2012, at 2:18 AM, Ahmad Aburizaiza wrote:

Hello all,

I am trying to build an iPhone app with a Google Map to display data stored on a remote PostGIS database. Anyone had such an experience. I need to know how to connect to the database so I can query the data.

Thanx in advance
---------------------------------------------------------------------------
Ahmad Aburizaiza
PhD student at George Mason University
Geography and Geoinformation Science Department
Fairfax, VA, USA
Tel : +1-703-981-0354

_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
Charlie Sharpsteen | 1 Jun 2012 18:21
Picon
Gravatar

Re: PostGIS through xCode

On Friday, June 1, 2012 4:30:41 AM UTC-7, chris mollis wrote:

Right.. using REST calls is the way to do that.   You'll basically need to do any complex geo queries/functions in PostGIS and then return vectors of lon/lat points which you then display with the MapKit apis.

On Fri, Jun 1, 2012 at 7:24 AM, Charles Galpin wrote:
Hi Ahmad

You won't connect to the database directly. Depending on what the data is you can use a variety of methods. Simple REST style calls to a web server which runs code to query the database and return the data could be sufficient, but for anything more complex I suggest using a WMS server like geoserver or mapserver.

If you want your app to run on multiple platforms consider doing it in html 5.

hth
charles

CartoDB is also a good choice that is worth some investigation:

    http://cartodb.com/

They do a great job of wrapping a web-accessible API around PostGIS tables. The source code for the entire system is also freely available on GitHub---but it does take a bit of work to unbox, configure and maintain by yourself.


-Charlie
_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
John Morrison | 2 Jun 2012 02:18
Picon

Re: 3D topology nodes?

Hello Sandro and Regina (et al);

Thank you both for solving that first problem ("when all else fails,
RTFM" :-)!!  I did some digging for info regarding pgadmin3 as kindly
suggested by Regina (see below) - hope it is useful.

Rather predictably, answering that single first question brings me to
my next two questions (I suppose this is progress after a fashion):

(1) Performance (or lack thereof): I am attempting to create topology
out of a rather large (36MPixel) SRTM elevation raster.  I am
currently using a very small tile as the processing times I am seeing
suggest using a calendar rather than a stopwatch to profile my code.
Is there some obvious thing I should be doing to speed things up?
Perhaps something analogous to how raster2pgsql emits an SQL file
rather than doing a pixel-at-a-time update?  Or perhaps I am going
about this entirely the wrong way?  (I had similar performance
problems in simply reading the raster out of PostGIS, but that was
more straightforward to work around...)

(2) Are there any "gotchas" of which I should be aware due to "no
proper 3D topology support?"  False co-planarity issues?  Limitations
to modeling road overpasses, etc?

As for pgadmin3 (which I had been using to try and figure this out
myself), I did some digging as Regina kindly suggested.  FYI I am
using revision 1.14.0.  When I select the node table's geom column,
the "Data type" as displayed in the properties window is
"geometry(1107458)."  The context menu's "properties" display shows a
data type of simply "geometry."

However, if the SQL pane is open, it shows a fragment of SQL ("ALTER
TABLE"...), including "ADD COLUMN geom geometry(PointZ, 4326)."

So it WAS visible, presuming I knew where to look (and I didn't).

Sorry, and thanks again for the help!

-jm

On Wednesday 30 May 2012, Sandro Santilli wrote:
> On Tue, May 29, 2012 at 10:01:35PM -0400, John Morrison wrote:
> > Hi;
> > 
> > Sorry if this is a dumb newbie question regarding support for 3D
> > topology (as I am relatively new to both SQL and PostGIS).
> > 
> > I am running PostGIS 2.0.1SVN r9732 on FC16/x86_64.
> > 
> > When I try to add a 3D point to a topology via either ST_AddIsoNode or
> > AddNode, I get an error of the form "Geometry has Z dimension, but
> > column does not."  Adding 2D points seems to work fine.
> 
> There's no proper 3D topology support, but you do can equip your
> primitives with a per-vertex Z value (2.5D) if you account for it
> at topology creation time. See manual page entry for CreateTopology
> on how to do that.
> 
> > pgadminIII gives a rather cryptic type of "geometry(1107456)" as the
> > data type of the "geom" column of the "node" table of my topology.
> 
> That is annoying, I would expect something like "geometry(point)"
> or "geometry(pointZ)" instead. Do types of other spatial tables
> look fine in pgadminIII or is it a general issue with any geometry
> column ?
> 
> --strk;
> 
>   ,------o-.
> 
>   |   __/  |    Delivering high quality PostGIS 2.0 !
>   |  
>   |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
> 
>   `-o------'
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users <at> postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

--

-- 
--- John Morrison
--- john.nmi.morrison <at> gmail.com
chris brisendine | 3 Jun 2012 16:02
Picon

more effective way?

I have a postgis table that contains radar. My problem is every 3
minutes I update the radar table and sometimes the end user has no
radar showing due to the new data loading
is there a more effective way than doing it like I am with the following code,

shp2pgsql -D -a -s 4269 last.shp base05 > base05.sql
psql -c "TRUNCATE TABLE base05" -d wxserver
psql -d wxserver -f base05.sql

I was dropping the table but that would cause my wms server to freakout.
Paul Ramsey | 3 Jun 2012 17:06
Picon
Gravatar

Re: more effective way?

You can run ddl in a transaction context, so the best way is to 

. Upload data to mynewtable
. Begin
. Alter table mytable rename to myoldtable
. Alter table mynewtable rename to mytable
. Commit
. Drop table myoldtable

P.

On 2012-06-03, at 7:02 AM, chris brisendine <ki4gyw <at> gmail.com> wrote:

> I have a postgis table that contains radar. My problem is every 3
> minutes I update the radar table and sometimes the end user has no
> radar showing due to the new data loading
> is there a more effective way than doing it like I am with the following code,
> 
> shp2pgsql -D -a -s 4269 last.shp base05 > base05.sql
> psql -c "TRUNCATE TABLE base05" -d wxserver
> psql -d wxserver -f base05.sql
> 
> I was dropping the table but that would cause my wms server to freakout.
> _______________________________________________
> postgis-users mailing list
> postgis-users <at> postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
David Quinn | 3 Jun 2012 18:33
Picon

Loading a shapefile into a postgres database remotely

Hi List,

I have been using the following approach to load a shapefile into my database locally:

shp2pgsql -s 2831 -i -I -D D:/test.shp public.test_shapefile | psql.exe -U postgres -d test_db -h localhost -p 5432

I now want to try to load spatial data into a database in a remote location. For the second part of my command, I tried the following:

psql.exe -U postgres -P password -d test_db_remote -h 75.75.75.75 -p 5432

I've tried a few variations of this without success. Is there anything that I am missing?

If it is relevant, psql.exe is on a windows 7 computer, and I am uploading the data to a postgres database on an ubuntu installation.

Thanks,
David

_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
Stephen Woodbridge | 3 Jun 2012 19:05
Favicon
Gravatar

Re: Loading a shapefile into a postgres database remotely

On 6/3/2012 12:33 PM, David Quinn wrote:
> Hi List,
>
> I have been using the following approach to load a shapefile into my
> database locally:
>
> shp2pgsql -s 2831 -i -I -D D:/test.shp public.test_shapefile | psql.exe
> -U postgres -d test_db -h localhost -p 5432
>
> I now want to try to load spatial data into a database in a remote
> location. For the second part of my command, I tried the following:
>
> psql.exe -U postgres -P password -d test_db_remote -h 75.75.75.75 -p 5432
>
> I've tried a few variations of this without success. Is there anything
> that I am missing?
>
> If it is relevant, psql.exe is on a windows 7 computer, and I am
> uploading the data to a postgres database on an ubuntu installation.

The server has to be configured to listen on 75.75.75.75 and to allow 
connection over the network device.

Look at your pg_hba.conf and postgresql.conf files. and if you make 
changes to these you have to restart the server before the changes take 
effect.

-Steve

Gmane