[postgis-users] You've found a bug!

Obe, Regina robe.dnd at cityofboston.gov
Wed Jul 18 05:40:46 PDT 2007


Is it the same dataset as you had in 8.1 and which version of PostGIS
are you running?  My only guess why it would have worked then (if same
dataset) and not now is maybe a difference in the way collect is working
in the newer version.
 
Well if you are collecting together a bunch of polygons or linestrings
then collect will return a multipolygon or multilinestring.  If you are
collecting multipolygons or multilinestrings then I think it usually
returns a geometrycollection.
 
If you are sure that each of your records is just a single polygon or
single linestring inside a multi-encasing, then you can probably do
something like this
 
collect(geometryn(the_geom,1)) 
 
to verify that you can get away with that, check to see if you have any
that have more than one linestring or polygon with 
 
something like
 
SELECT * from sometable where numgeometries(the_geom) > 1
 
Hope that helps,
Regina
 
 

________________________________

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of John
Cole
Sent: Tuesday, July 17, 2007 6:16 PM
To: 'PostGIS Users Discussion'
Subject: RE: [postgis-users] You've found a bug!



Geomunion works but is painfully slow (minutes rather than seconds).
Any suggestions on how to get a collect (or something similar) to work?

 

Thanks,

 

John

 

________________________________

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Obe,
Regina
Sent: Tuesday, July 17, 2007 2:42 PM
To: PostGIS Users Discussion
Subject: RE: [postgis-users] You've found a bug!

 

That's strange.  I never thought shape files ever supported geometry
collections.  Are you sure that last time you ran it maybe your collect
returned all multipoint or multipolygons  and now with a newer dataset
your have a mixed back resulting in one or more records being a
geometrycollection?

 

What happens when you replace collect with geomunion?

 

thanks,

Regina

 

 

 

________________________________

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of John
Cole
Sent: Tuesday, July 17, 2007 3:03 PM
To: 'PostGIS Users Discussion'
Subject: [postgis-users] You've found a bug!

Running pgsql2shp with the following query on a tiger lkA table, I get a
notice that I've found a bug :-)  This query worked with 8.1.

 

"select coalesce(fedirp || ' ', '') || fename || coalesce(' ' || fetype,
'') || coalesce(' ' || fedirs, '') as name, case when substring(fename,
'(Old)') is not null then null else substring(fename,
'(?:I[[:space:]]?-?|Highway|Hwy|County[[:space:]]Road|Co[[:space:]]Rd|Co
unty|State[[:space:]]Route|Parish|Parish[[:space:]]Road|S[[:space:]]R|C[
[:space:]]R|Sr|Co|Carretera|St[[:space:]]Rt|C Rd|Co
R|County[[:space:]]Route|Cr-?)+[[:space:]]?([[:digit:]]+)') end  as
hwy_num, cfcc,
transform(simplify(segmentize(transform(collect(the_geom), 1000000), 1),
3), 4326) as the_geom from TGR01001 where substring(cfcc,
'(A[456789])+') is not null group by cfcc, hwy_num, fedirp, fename,
fetype, fedirs order by cfcc desc"  

Preparing table for user query... Done.

Initializing... type 'GEOMETRYCOLLECTION' is not Supported at this time.

The DBF file will be created but not the shx or shp files.

You've found a bug! (pgsql2shp.c:2869)

 

 

Thanks,

 

John

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the
sender. This message contains confidential information and is intended
only for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. 

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the
sender. This message contains confidential information and is intended
only for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. 



-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070718/4a3c1bcc/attachment.html>


More information about the postgis-users mailing list