Re: [postgis-users] Point in Poly Speed

2011-03-25 Thread Nicklas Avén
On Thu, 2011-03-24 at 20:18 -0400, Stephen Woodbridge wrote: Also you want to try reversing you arguments to st_dwithin( and put the polygon first as there may be some caching ot the first parameter that might speed things up. The order will make no difference. It is up to the planner to

[postgis-users] MULTILINESTRING to MULTIPOLYGON

2011-03-25 Thread Javier Perez
Hi!, In my app I get a MULTILINESTRING and want to insert it as MULTIPOLYGON. I think there's an easy way but I did't found, can anyone bring some light? Thanks in advance ___ postgis-users mailing list postgis-users@postgis.refractions.net

Re: [postgis-users] MULTILINESTRING to MULTIPOLYGON

2011-03-25 Thread Morin , Marc-André
Hi, This is the recipe I found in the past to get it done: http://postgis.refractions.net/pipermail/postgis-users/2008-May/019901.html It worked well for me. Regards, Marc-André De : postgis-users-boun...@postgis.refractions.net

Re: [postgis-users] MULTILINESTRING to MULTIPOLYGON

2011-03-25 Thread Javier Perez
Hi Marc-Andre! I think this usefull. Thanks a lot! Regards 2011/3/25 Morin, Marc-André marc-andre.mo...@dfo-mpo.gc.ca *Hi,* ** *This is the recipe I found in the past to get it done:* ** http://postgis.refractions.net/pipermail/postgis-users/2008-May/019901.html It worked well for me.

[postgis-users] How to create a point geometry from two text fields?

2011-03-25 Thread Gis Mage
Hello! I have a table with two text fields lat and long of character varying type. I've created a field the_geom with type geometry. How do I calculate the_geom field with an sql query? The table is huge - about 1.5 million records, so I think the fastest way to do this is to use pointfromtext

Re: [postgis-users] ST_Distance_Sphere too slow

2011-03-25 Thread David William Bitner
Another option if your data is all within a relatively local area is to project your data into a suitable projection for that data (ST_Transform), create an index on the projected data and then use ST_DWithin which will automatically do the /ST_Expand behind the scenes. Planar math is much

Re: [postgis-users] How to create a point geometry from two text fields?

2011-03-25 Thread Stephen Woodbridge
update mytable set the_geom=st_setsrid(st_makepoint(lon,lat),4326); On 3/25/2011 10:44 AM, Gis Mage wrote: Hello! I have a table with two text fields lat and long of character varying type. I've created a field the_geom with type geometry. How do I calculate the_geom field with an sql query?

Re: [postgis-users] How to create a point geometry from two text fields?

2011-03-25 Thread Charles Galpin
But his lat/lon are character varying so I think it would be more like update mytable set the_geom=ST_GeometryFromText('POINT(' || long || ' ' || lat || ')',4326) On Mar 25, 2011, at 11:26 AM, Stephen Woodbridge wrote: update mytable set the_geom=st_setsrid(st_makepoint(lon,lat),4326); On

Re: [postgis-users] Problems with ST_Within in an island of a multipolygon

2011-03-25 Thread Larry Reeder
Thanks for the response, Sandro.I've posted a test case on Dropbox at http://dl.dropbox.com/u/14591732/foo_reload.sql. This SQL script will create a table called foo_reload with three features. Here's my sample session: # \i /tmp/foo_reload.sql [load statements removed] # select gid,

Re: [postgis-users] How to create a point geometry from two text fields?

2011-03-25 Thread pcreso
Concatenation of strings geomfromtext or cast to numeric makepoint, I'm not sure which would be faster, but both will work. So (as below)  update mytable set the_geom=ST_GeometryFromText('POINT(' || long || ' ' || lat || ')',4326) or update mytable set

Re: [postgis-users] Problems with ST_Within in an island of amultipolygon

2011-03-25 Thread Paragon Corporation
Interesting -- I can confirm too. When I do a ST_Dwithin check things behave right. select gid, ST_NPoints(the_geom), ST_Distance(the_geom,ST_GeomFromText('POINT (-115.04252 36.05137)', -1)) As dist , ST_DWithin(ST_GeomFromText('POINT (-115.04252 36.05137)', -1), the_geom,0.001) from

Re: [postgis-users] Problems with ST_Within in an island of a multipolygon

2011-03-25 Thread Sandro Santilli
On Fri, Mar 25, 2011 at 10:41:10AM -0600, Larry Reeder wrote: FYI, I verified I can reproduce this behavior in PostGIS 1.5.2: Larry: I filed a ticket [1] for this, consider adding yourself in cc to be notified about updates, or to give further feedback. [1]

Re: [postgis-users] Problems with ST_Within in an island of a multipolygon

2011-03-25 Thread Larry Reeder
Thanks Sandro! I'm seeing updates regarding this on the dev list, but I'll add myself as a CC to the ticket too. -Larry On Fri, Mar 25, 2011 at 12:39 PM, Sandro Santilli s...@keybit.net wrote: On Fri, Mar 25, 2011 at 10:41:10AM -0600, Larry Reeder wrote: FYI, I verified I can reproduce

Re: [postgis-users] Linux geocoder script ?

2011-03-25 Thread fork
fork forkandwait at gmail.com writes: Paragon Corporation lr at pcorp.us writes: One of these days hopefully soon, I'll dust off my OpenSUSE VM and build PostGIS 2.0 and test Tiger geocoder on it. fork forkandwait at gmail.com writes: One of these days hopefully soon, I'll dust off