Re: [postgis-users] ST_AsSVG crashes with large/complex geometries

2009-02-20 Thread Mike Leahy
Hi Mark, Sorry for the delay - I've been on the road a bit. I've got postgresql-8.3.6, and postgis-1.3.5, both installed from the Fedora 10 repos. I'll report this as a bug sometime in the next few days when I have a bit of time to put a sample together...unless anyone has any other sugges

Re: [postgis-users] function in plpgsql

2009-02-20 Thread alex bodnaru
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 eehab hamzeh wrote: > Thanks for your replay > i need to check if the resultof this query is null or not null then do > two different things > as below > if SELECT DISTINCT o FROM ramadan WHERE o=mypoint or a=mypoint > UNION SELECT DISTINCT a FROM

[postgis-users] function in plpgsql

2009-02-20 Thread eehab hamzeh
Thanks for your replay i need to check if the resultof this query is null or not null then do two different things as below if SELECT DISTINCT o FROM ramadan WHERE o=mypoint or a=mypoint UNION SELECT DISTINCT a FROM ramadan WHERE o=mypoint or a=mypoint; is null then INSERT INT

[postgis-users] Best practices for geo-spatial city name searches?

2009-02-20 Thread Mark Stosberg
Hello, I use PostgreSQL and the "cube" type to perform geo-spatial zipcode proximity searches. I'm wondering about the best practices also supporting a geo-spatial distance search based on a city name rather than zipcode. In our original data model, we used a 'zipcodes' table, with the zipcode

RE: [postgis-users] Re: maximum distance between a POINT and POLYGON

2009-02-20 Thread Sufficool, Stanley
>From your initial approach, the following should work. I don't use spheroid projections, so this was only tested with st_distance. I fudged in the distance_spheroid. You may also want to replace the st_centroid function with your field "geometry_centroid". select max(myDistance) FROM ( SELE

RE: [postgis-users] Plpgsql function

2009-02-20 Thread Obe, Regina
EEHab, Do you need to return the values or just insert them? If you don't need them returned it is much easier and efficient to just return boolean true, or if you need to return the values, do as Alex suggested (change to RETURNS setof integer and use a RETURN NEXT syntax). There are easie

RE: [postgis-users] Upgrade from 1.3.1 to 1.3.5

2009-02-20 Thread Obe, Regina
Devrim, I think if you are just going from 1.3.1 to 1.3.5 running the lwpostgis_upgrade.sql should be all you need to do. I don't think any aggregate functions were changed between those 2 which is usually the thing that doesn't come over with minor versions. Hope that helps, Regina

Re: [postgis-users] Export empty PostGIS table

2009-02-20 Thread Joukje Aris
Thanks, I thought of that. But that leaves me with the trouble of removing it afterwards in the shapefile and the table each time I export a table that happens to be empty at the time. I do need an exact match with the number of rows in the database. It would have been nice to produce the shapefile

Re: [postgis-users] Export empty PostGIS table

2009-02-20 Thread Eduin Yezid Carrillo Vega
Try adding a fake row. Eduin Yesid Carrillo Vega Ingeniero Civil, Esp. Sistemas de Información Geográfica Centro de Investigación y Desarrollo en Información Geográfica Instituto Geográfico Agustín Codazzi - IGAC Cr 30 48-51 Tel +57 1 3694000 ext 4603 Bogotá D.C., Colombia On Fri, Feb 20, 200

Re: [postgis-users] attempt to deserialize a point which is really aInvalid type

2009-02-20 Thread Willy-Bas Loos
Hi, in a late reaction, I ran into the same error when I tried to measure distance_sphere between polygons. It only does points. In PostGIS 1.3.3 I got the much clearer message: "ERROR: lwpoint_deserialize: attempt to deserialize a point which is really a Polygon" Possibly, "a Invalid type" is to

[postgis-users] Export empty PostGIS table

2009-02-20 Thread Joukje Aris
Hello list, Does anyone know if it is possible to export an empty PostGIS table or view with no rows to a valid shapefile? When exporting a table or view with no rows in it, pgsql2shp returns "ERROR: Cannot determine geometry type (empty table).". With ogr2ogr there is no error message, but no sh

[postgis-users] Upgrade from 1.3.1 to 1.3.5

2009-02-20 Thread Devrim GÜNDÜZ
Hi, Is there anything that we should do while upgrading from 1.3.1 to 1.3.5, like dumping /restorin something or running a script? Thanks, -- Devrim GÜNDÜZ, RHCE devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org signature.asc Descrip