[postgis-users] multilinestring/polygon display lookup questions

Jedrin jrubiando at gmail.com
Thu Jan 14 13:15:32 PST 2010


I have a shapefile that was imported as multilinestring geo type. When
I display it on a map it looks good as each shape is a square. When a
user clicks on this however the postgis st_intesects() function and
the like don't detect the click as it's not a polygon.

If I do a conversion on the fly like this to a polygon, it seems like
the st_astext() causes the query to run for too long:

 select gid,label from shape_import_mass_tiles900913 where
ST_Intersects('srid=900913;Point(-7972592.6161289
5242414.1716097)',st_polygon(st_linemerge(ST_AsText(poly)),
900913)::geometry);

 If the shapefile is imported as polygons instead, then wms through
geoserver displays the shapes over the map and obscures the map, even
though I set transparency in openlayers/wms. I'm not sure what is the
easiest way to get this to work to do what I want .. Currently I have
two tables as a hack, one is polygons and the other lines, but that is
really not optimal at all ..

thanks





More information about the postgis-users mailing list