Ticket #1928 (closed defect: fixed)

Opened 10 months ago

Last modified 6 months ago

st_geomfromgml multipoint issue

Reported by: fordfrog Owned by: strk
Priority: medium Milestone: PostGIS 2.0.2
Component: postgis Version: 2.0.x
Keywords: history Cc: petr@…

Description

using postgresql 9.1.4 and postgis 2.0.1 on linux amd64

this query should return gml string but instead returns empty result:

test=# select st_asgml(st_geomfromgml('<gml:MultiPoint xmlns:gml="http://www.opengis.net/gml/3.2" gml:id="DOB.545058.X" srsName="urn:ogc:def:crs:EPSG::2065" srsDimension="2"><gml:pointMembers><gml:Point gml:id="DOB.545058.1"><gml:pos>496547.00 1139895.00</gml:pos></gml:Point></gml:pointMembers></gml:MultiPoint>'));

st_asgml


(1 row)

there is probably general issue with reading the result of st_geomfromgml created from gml:MultiPoint element containing gml:pointMembers. tests with elements with gml:pointMember (singular) within gml:MultiPoint worked fine for me. unfurtunately the data i am processing use gml:pointMembers.

Change History

Changed 10 months ago by fordfrog

i just noticed i am using postgis 2.0.0, gonna try that with 2.0.1 and will report back

Changed 10 months ago by fordfrog

so postgis 2.0.1 is affected too

Changed 10 months ago by fordfrog

when using st_astext(), it returns "MULTIPOINT Z EMPTY". also, looking at the code, there is no string pointMembers, just pointMember, so it seems support for this element is missing.

Changed 10 months ago by kashif

The issue will also occur with MultiCurve? and MultiPolygon?, where in particular the parser only matches curveMember and polygonMember etc. I can try to fix all these issues if no one is working on it

Changed 10 months ago by strk

I think nobody is working on this. Please don't forget test cases

Changed 10 months ago by kashif

great will send you a patch by the weekend with tests of course :-)

Changed 10 months ago by kashif

Here is the initial patch with all the tests passing:

 https://github.com/postgis/postgis/pull/2.diff

Kashif Rasul and Shoaib Burq / SpacialDB

Changed 9 months ago by xificurk

  • cc petr@… added

Changed 8 months ago by kashif

Could you kindly let me know if there is any issue with this fix not getting merged so I can fix it?

Thanks!

Changed 8 months ago by strk

  • owner changed from pramsey to strk
  • status changed from new to assigned

Looks fine to me. Will pull right now.

Changed 8 months ago by kashif

great and thank you once again for all your help!

Changed 8 months ago by strk

  • status changed from assigned to closed
  • resolution set to fixed

So it is in 2.0 branch as r10353 and in trunk as r10354. Thank you for your contribution !

Changed 6 months ago by robe

  • keywords history added
Note: See TracTickets for help on using tickets.