Re: [postgis-users] make generates incorrect PERL variable value on v1.5.2
Correction: that was PostgreSQL 9.0.3 Sorry! -- View this message in context: http://old.nabble.com/make-generates-incorrect-PERL-variable-value-on-v1.5.2-tp31112316p31112350.html Sent from the PostGIS - User mailing list archive at Nabble.com. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] make install as root on v1.5.2
Correction: that was PostgreSQL 9.0.3 Sorry! -- View this message in context: http://old.nabble.com/make-install-as-root-on-v1.5.2-tp31112326p31112347.html Sent from the PostGIS - User mailing list archive at Nabble.com. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] make install as root on v1.5.2
Hi, I have installed PostGIS 1.5.2 on a PostgreSQL 9.0.4 (OpenSCG RPM) on an RHEL5.5 system - the instructions in the included README.postgis indicate that I should perform "make install" as "postgres" user. This didn't work and generated the error below: /bin/mkdir -p '/opt/postgres/9.0/share/postgresql/contrib/postgis-1.5' /bin/mkdir: cannot create directory `/opt/postgres/9.0/share/postgresql/contrib/postgis-1.5': Permission denied make[1]: *** [installdirs] Error 1 make[1]: Leaving directory `/home/maptools/other/pgis_1_5_2/postgis-1.5.2/postgis' make: *** [postgis-install] Error 2 I overcame this by performing "make install" as "root" user - I did this because I noted that the online HTML documentation for v1.5 doesn't indicate which user to install as - at least as far as I could see (ref http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630263 ) Is this a documentation error, or should I really be installing as user "postgres"? Thanks. Regards, Bill Teluk. -- View this message in context: http://old.nabble.com/make-install-as-root-on-v1.5.2-tp31112326p31112326.html Sent from the PostGIS - User mailing list archive at Nabble.com. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] make generates incorrect PERL variable value on v1.5.2
Hi, I have installed PostGIS 1.5.2 on a PostgreSQL 9.0.4 (OpenSCG RPM) on an RHEL5.5 system, during the build process, when I ran "make" (after "./configure") I got the following error. Error message extract: gcc -E -traditional-cpp postgis.sql.in.c | grep -v '^#' > postgis.sql.in sed 's,MODULE_PATHNAME,$libdir/postgis-1.5,g' postgis.sql.in >postgis.sql gcc -E -traditional-cpp uninstall_postgis.sql.in.c | grep -v '^#' > uninstall_postgis.sql.in sed 's,MODULE_PATHNAME,$libdir/postgis-1.5,g' uninstall_postgis.sql.in >uninstall_postgis.sql "/opt/ActivePerl-5.10/bin/perl" ../utils/postgis_proc_upgrade.pl postgis.sql 1.5 > postgis_upgrade_15_minor.sql /bin/sh: /opt/ActivePerl-5.10/bin/perl: No such file or directory make[1]: *** [postgis_upgrade_15_minor.sql] Error 127 make[1]: *** Deleting file `postgis_upgrade_15_minor.sql' make[1]: Leaving directory `/home/maptools/other/pgis_1_5_2/postgis-1.5.2/postgis' make: *** [postgis] Error 2 It appears to be a "PERL" variable belonging to the ./postgis/Makefile script - somehow it's getting set to a value of "/opt/ActivePerl-5.10/bin/perl" which doesn't appear to relate to my system (which only has Perl v5.8 installed, and in a different directory.) I couldn't work out where "PERL" was being set in the scripts. I've seen a similar ticket reported for the same problem for V2.0 (the ticket is currently closed.) Refs are: http://trac.osgeo.org/postgis/ticket/521 and http://trac.osgeo.org/postgis/wiki/DevWikiWinMingWSys_20 That particular fault was reported against a Windows install, but it also seems to affect the Linux installation. I used the solution provided in the Wiki page reporting the fault eg. after running configure sed 's,$(PERL),perl,g' postgis/Makefile2 mv postgis/Makefile2 postgis/Makefile ... and it then worked for me. I was wondering if this is actually a bug or is it something about my system that caused this problem? Thanks, Bill Teluk. -- View this message in context: http://old.nabble.com/make-generates-incorrect-PERL-variable-value-on-v1.5.2-tp31112316p31112316.html Sent from the PostGIS - User mailing list archive at Nabble.com. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] datatype question in postgis
Hi, I have a project on my desktop gis which I would like to transfer to the web and offer as a map service. Currently the project consists of around 90 layers (all shps) -points/lines and polygons. If I serve them through postgresql into geoserver should I keep the data structure as it is, or should I combine all polygons to one shp -all polylines into one shp and points to one shp and then import into three different postgis tables? what are the implications for serving my data? Is it quicker to serve fewer larger tables or many smaller tables? Is there a geometry type which takes all geometries(ie points,lines and polygons)? so that I could serve all my data from one table?...obviously the symbology of 90 classes would make the sld file slightly worrying, but would this be better that having 90 separate sld´s? thanks for any tips, Robert ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Creating a grid purely in SQL
I would use PostGIS raster: first: CREATE OR REPLACE FUNCTION ST_PixelAsPolygons(rast raster, band integer) RETURNS SETOF geomval AS $$ DECLARE rast alias for $1; w integer; h integer; x integer; y integer; result geomval; BEGIN SELECT st_width(rast), st_height(rast) INTO w, h; FOR x IN 1..w LOOP FOR y IN 1..h LOOP SELECT ST_PixelAsPolygon(rast, band, x, y), ST_Value(rast, band, x, y) INTO result; RETURN NEXT result; END LOOP; END LOOP; RETURN; END; $$ LANGUAGE 'plpgsql'; CREATE FUNCTION ST_PixelAsPolygons(raster) RETURNS SETOF geomval AS $$ SELECT ST_PixelAsPolygons($1, 1); $$ LANGUAGE SQL; and then CREATE TABLE cells AS SELECT cell_id, ST_Centroid((gv).geom) centroid, (gv).geom the_geom FROM (SELECT generate_series(1, 100) cell_id, ST_PixelAsPolygons(st_makeemptyraster(10, 10, 0, 0, 0.5, 0.5, 0, 0, 4326)) gv) foo 10 and 10 are X and Y 0 and 0 are ulx and uly 0.5 and 0.5 are width 'w' and height 'h' next two 0 are skewx and skewy 4326 is SRID. This generate two geometry columns. One for the centroid of the cell and one for the cell itself. Pierre >-Original Message- >From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users- >boun...@postgis.refractions.net] On Behalf Of Mr. Puneet Kishor >Sent: 7 mars 2011 23:13 >To: PostGIS Users Discussion >Subject: [postgis-users] Creating a grid purely in SQL > >Given a top-left starting point [ulx, uly], and a cell width 'w' and height >'h', is it possible to >create a table entirely in SQL populated with rows increasing from left to >right up to X and top to >bottom up to Y. The table schema would be something like -- > >CREATE TABLE cells ( > cell_id INTEGER NOT NULL, > xmid DOUBLE PRECISION, > ymid DOUBLE PRECISION, > the_geom GEOMETRY, > CONSTRAINT cells_pkey PRIMARY KEY (cell_id) >); > >where xmid = (xmin + xmax) / 2 and ymid = (ymin + ymax) / 2, [xmin, ymin, >xmax, ymax] being the >corners of each cell. > >A bonus question -- is it possible to store two geometry columns in one table? >For example, if I >wanted to store the geometry for both the center points [xmin, ymid] as well >as the box [xmin, ymin, >xmax, ymax], would that be possible? Would that even be recommended (for >example, to speed up >queries/drawing, etc.). > >Puneet. >___ >postgis-users mailing list >postgis-users@postgis.refractions.net >http://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Infinite loop in st_intersects - because of incorrect data out of st_transform?
On 08/03/11 09:16, Magnus Hagander wrote: Since nobody appears to be too interested in producing a quick fix in geos, attached is a patch that puts in an *ugly* workaround in PostGIS, that simply rejects the infinite values higher up in the stack. I don't consider this a long-term fix, but it at least causes an error instead of getting stuck in an infinite loop that can only be terminated with kill -9... So pending a solution in geos, I would suggest this workaround (or something better located written by someone who actually know the postgis code better than me) be put in. The way it is now, any application that allows the user to specify input that could generate such a geometry could trivially denial-of-service any postgis site... Hi Magnus, What was the discussion with the GEOS people like? Did they consider this to be a bug in GEOS or a bug in PostGIS? The basic workaround looks good, but I'd still be interested on Frank's thoughts re: whether infinity is a valid projection output point in order to determine the best place for the check. ATB, Mark. -- Mark Cave-Ayland - Senior Technical Architect PostgreSQL - PostGIS Sirius Corporation plc - control through freedom http://www.siriusit.co.uk t: +44 870 608 0063 Sirius Labs: http://www.siriusit.co.uk/labs ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Increase query performance
Thanks for all the suggestions. I first thought about doing the simplify, but after some reconsideration I realized that this would change the geometry of the country borders, and Area measurements might be wrong. Then i tried the query without the ST_Intersection and only the conditional ST_Intersects. This completed in 87 seconds, so this was very fast compared to 40-50 minutes per year. I also tried the UNION ALL suggestion by Nicklas which had almost similar performance as the original query. I will test this some more to see whether i can save some time. My guess is that the calculation time required to create the new intersected geometry is what takes so long, and this is probably something i need to accept (or get more cpu power :) Andreas 2011/3/9 Mark Cave-Ayland > On 08/03/11 17:01, Andreas Forø Tollefsen wrote: > > After a suggestion from pgsql_performance i tried with ST_Simplify to >> speed things up. >> However this gives me a: >> NOTICE: ptarray_simplify returned a <2 pts array >> >> Then server connection terminates. >> >> Like this: >> >> SELECT ST_Intersection(priogrid_land.cell, >> ST_Simplify(cshapeswdate.geom,0.1)) AS geom, >> priogrid_land.gid AS divider, gwcode, gwsyear, gweyear, startdate, >> enddate, capname, caplong, caplat, col, row, xcoord, ycoord >> FROM priogrid_land, cshapeswdate WHERE ST_Intersects(priogrid_land.cell, >> ST_Simplify(cshapeswdate.geom,0.1)) AND cshapeswdate.gwsyear <=1946 AND >> cshapeswdate.gweyear >=1946 AND cshapeswdate.startdate <= '1946/1/1'; >> > > Yup that's a bug related to the new code in trunk - I think we've already > got something similar filed in the bug tracker. This is probably going to > require a Paul to take a look at it. > > > ATB, > > Mark. > > -- > Mark Cave-Ayland - Senior Technical Architect > PostgreSQL - PostGIS > Sirius Corporation plc - control through freedom > http://www.siriusit.co.uk > t: +44 870 608 0063 > > Sirius Labs: http://www.siriusit.co.uk/labs > > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] bug in st_difference() ?
Hi Birgit, this is only a topoligie Problem. Your secound polygon is computed outside PostGIS and numeric precision are lost by import. In this case ST_Difference() and other PostGIS function can have results with very small errors. You can clean the second polygon by move all points to the borders from first. 3597691.18360053 5323329.04452537 becomes 3597691.183600531425327 5323329.044525371864438 and so on. Gr Ralf Am Mittwoch 09 März 2011, 15:05:43 schrieb Birgit Laggner: > Dear list, > > when I am using ST_Difference(), I often have the problem, that the > resulting geometries contain vertexes lying outside of the supposed > geometry extent. My impression is that the function tries to preserve > vertexes of the input geometries and does not check properly, whether > the point lies inside the extent of the new geometry or not. > > Here an example: > > select st_astext(st_difference(a_geom, b_geom)) from > st_geomfromtext('POLYGON((3580359 5328360,3588529 5330935,3597943 > 5323120,3606024 5322587,3612951 5315217,3608155 5306691,3603804 > 5305093,3596166 5306159,3591105 5310244,3584799 5310688,3576540 > 5317437,3580359 5328360))',31467) as a_geom, > st_geomfromtext('POLYGON((3597691.18360053 5323329.04452537,3597943 > 5323120,3606024 5322587,3611561.81746298 5316695.02444028,3611480 > 5316582,3605931 5322425,3597573 5323069,3597691.18360053 > 5323329.04452537))',31467) as b_geom; > > results in: > "POLYGON((3580359 5328360,3588529 5330935,3597943 > 5323120,3597691.18360053 5323329.04452537,3597573 5323069,3605931 > 5322425,3611480 5316582,3611561.81746298 5316695.02444028,3606024 > 5322587,3612951 5315217,3608155 5306691,3603804 5305093,3596166 > 5306159,3591105 5310244,3584799 5310688,3576540 5317437,3580359 5328360))" > > Vertexes 4 (3597691.18360053 5323329.04452537) and 8 (3611561.81746298 > 5316695.02444028) are out of the supposed geometry extent. > > I am using PostGIS 1.5.2 with GEOS 3.2.2 on a 8.4.5 PostgreSQL-DB on > 64-bit SUSE Linux. > > Maybe, there is a simple explanation, why this behavior might be wanted > - if not, I would like to complain this as a bug (or at least suggest an > improvement of the function in future versions)... > > Regards, > > Birgit. > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] bug in st_difference() ?
Dear list, when I am using ST_Difference(), I often have the problem, that the resulting geometries contain vertexes lying outside of the supposed geometry extent. My impression is that the function tries to preserve vertexes of the input geometries and does not check properly, whether the point lies inside the extent of the new geometry or not. Here an example: select st_astext(st_difference(a_geom, b_geom)) from st_geomfromtext('POLYGON((3580359 5328360,3588529 5330935,3597943 5323120,3606024 5322587,3612951 5315217,3608155 5306691,3603804 5305093,3596166 5306159,3591105 5310244,3584799 5310688,3576540 5317437,3580359 5328360))',31467) as a_geom, st_geomfromtext('POLYGON((3597691.18360053 5323329.04452537,3597943 5323120,3606024 5322587,3611561.81746298 5316695.02444028,3611480 5316582,3605931 5322425,3597573 5323069,3597691.18360053 5323329.04452537))',31467) as b_geom; results in: "POLYGON((3580359 5328360,3588529 5330935,3597943 5323120,3597691.18360053 5323329.04452537,3597573 5323069,3605931 5322425,3611480 5316582,3611561.81746298 5316695.02444028,3606024 5322587,3612951 5315217,3608155 5306691,3603804 5305093,3596166 5306159,3591105 5310244,3584799 5310688,3576540 5317437,3580359 5328360))" Vertexes 4 (3597691.18360053 5323329.04452537) and 8 (3611561.81746298 5316695.02444028) are out of the supposed geometry extent. I am using PostGIS 1.5.2 with GEOS 3.2.2 on a 8.4.5 PostgreSQL-DB on 64-bit SUSE Linux. Maybe, there is a simple explanation, why this behavior might be wanted - if not, I would like to complain this as a bug (or at least suggest an improvement of the function in future versions)... Regards, Birgit. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] newbie prob: PostgreSQL server will not connect so PostGIS installation fails with dbcreate
Did you install PostgreSQL? It sounds like you need to learn the basics of Relations Database Management Systems (RDMS) before you dive into PostgreSQL/PostGIS. The server is the database system. It manages connections to the databases. If the server isn't running, there's nothing to which you can connect. You can't create or connect to a database until the server is running (though one may have been created during installation). PGAdmin does not create servers, it connects to them. You might want to start over and use the OpenGeo Suite to install everything http://opengeo.org/technology/suite/download/ Or, if you're never going to use the database in a multi-user environment, take a look at SpatialLite (http://www.gaia-gis.it/ spatialite/) and see if it will do what you need. It's not as robust as PostGIS but it does a lot. Sean On Mar 9, 4:13 am, "Florian Reimer" wrote: > Hi, > > thanks for the reply but I do not have a "Start Database" Icon. I think a DB > was never yet created as PostGIS Installation fails, because the Server > created by pg Admin III can not connect. > > Is it correct to use default settings? > Server [localhost] > Database [postgres] > Post [5432] > Username [postgres] > > The server does not connect, but in I cant in > postgresql.conf setting is > listen_addresses = '*' #following help files this should make > the server listen to all connections... > > I think I dont understand the entire "Server" concept of PostgreSQL - what is > it good for if I might just want to operate on a single machine? > > I cant install PostGIS because during Installation it tries dbcreate, which > does not work while PostgreSQL server can not connect... > > hints will be appreciated. thanks! > > FR > -- > NEU: FreePhone - kostenlos mobil telefonieren und surfen! > > Jetzt informieren:http://www.gmx.net/de/go/freephone > ___ > postgis-users mailing list > postgis-us...@postgis.refractions.nethttp://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Is there any free postgis host?
You can a year of Amazon AWS for free: http://aws.amazon.com/free/ OpenGeo has an AMI you can use: http://blog.opengeo.org/2010/09/13/opengeo-suite-community-edition-on-amazon-web-services/ That combination might give a free platform for testing for a year. Sean On Mar 9, 5:38 am, Saka Royban wrote: > Hi all > I wonder if there is any free postgis host on the web for testing an asp.net > application which uses postgis? > > regards > > ___ > postgis-users mailing list > postgis-us...@postgis.refractions.nethttp://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] Is there any free postgis host?
Hi all I wonder if there is any free postgis host on the web for testing an asp.net application which uses postgis? regards ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Increase query performance
On 08/03/11 17:01, Andreas Forø Tollefsen wrote: After a suggestion from pgsql_performance i tried with ST_Simplify to speed things up. However this gives me a: NOTICE: ptarray_simplify returned a <2 pts array Then server connection terminates. Like this: SELECT ST_Intersection(priogrid_land.cell, ST_Simplify(cshapeswdate.geom,0.1)) AS geom, priogrid_land.gid AS divider, gwcode, gwsyear, gweyear, startdate, enddate, capname, caplong, caplat, col, row, xcoord, ycoord FROM priogrid_land, cshapeswdate WHERE ST_Intersects(priogrid_land.cell, ST_Simplify(cshapeswdate.geom,0.1)) AND cshapeswdate.gwsyear <=1946 AND cshapeswdate.gweyear >=1946 AND cshapeswdate.startdate <= '1946/1/1'; Yup that's a bug related to the new code in trunk - I think we've already got something similar filed in the bug tracker. This is probably going to require a Paul to take a look at it. ATB, Mark. -- Mark Cave-Ayland - Senior Technical Architect PostgreSQL - PostGIS Sirius Corporation plc - control through freedom http://www.siriusit.co.uk t: +44 870 608 0063 Sirius Labs: http://www.siriusit.co.uk/labs ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] newbie prob: PostgreSQL server will not connect so PostGIS installation fails with dbcreate
Hi, thanks for the reply but I do not have a "Start Database" Icon. I think a DB was never yet created as PostGIS Installation fails, because the Server created by pg Admin III can not connect. Is it correct to use default settings? Server [localhost] Database [postgres] Post [5432] Username [postgres] The server does not connect, but in I cant in postgresql.conf setting is listen_addresses = '*' #following help files this should make the server listen to all connections... I think I dont understand the entire "Server" concept of PostgreSQL - what is it good for if I might just want to operate on a single machine? I cant install PostGIS because during Installation it tries dbcreate, which does not work while PostgreSQL server can not connect... hints will be appreciated. thanks! FR -- NEU: FreePhone - kostenlos mobil telefonieren und surfen! Jetzt informieren: http://www.gmx.net/de/go/freephone ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] 2010 Census
Eric, I'm not sure if its any value to you, but the PostGIS 2.0 we upgraded the Tiger geocoder to load in Tiger 2010 data. We only loaded in the datasets that were relevant for geocoding, but the system is table driven, so you could use it to load the other datasets you care about. http://www.postgis.org/documentation/manual-svn/Extras.html#Tiger_Geocoder The generator is described here: http://www.postgis.org/documentation/manual-svn/Loader_Generate_Script.html Although its pacakged in PostGIS 2.0, it will work in PostGIS 1.5 so you can still use it if you don't want to try the PostGIS 2.0 SVN (not yet released version). In fact for our production use, we've been using it against PostGIS 1.5. Hope that helps, Leo and Regina http://www.postgis.us _ From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Eric Aspengren Sent: Tuesday, March 08, 2011 9:11 PM To: postgis-users@postgis.refractions.net Subject: [postgis-users] 2010 Census I know this has likely been covered on this list before. So, pardon if this is redundant, I just signed up. I'm looking for a good tutorial to get the new 2010 Census data for a state loaded into a PostGIS database, including all the recent Tiger files and demographic data. Is there a good one out there? -- Eric Aspengren Data Manager Planned Parenthood of the Heartland (402) 478-VOTE ericas...@gmail.com ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users