Opened 13 years ago
Closed 13 years ago
#1377 closed defect (fixed)
GML for empty geometries should be NULL
Reported by: | strk | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.0 |
Component: | postgis | Version: | master |
Keywords: | gml | Cc: |
Description
EMPTY geometries can't be represented with a valid GML, so NULL should be returned for all of them.
Change History (5)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Andrea: do you have any knowledge of a GML _reader_ capable of understanding one of the above asn an EMPTY geometry ? I'd love to have a lossless roundtrip between ST_AsGML and ST_GeomFromGML. See also #1059.
comment:3 by , 13 years ago
Keywords: | gml added |
---|
comment:4 by , 13 years ago
Well, IMO we can have symmetric behavior in AsGML/FromGML or we can have valid GML: I don't feel that we can have both. Currently AsGML emits invalid GML on empty, so that needs to be changed or accepted. I don't believe that we can depend on the complex valid variants that we think signify "empty" will be generally accepted as empty, so it would be better to punt on empty, either by erroring or by emitting null.
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Since everyone seems pretty adamant on this ticket that we not emit the invalid empty gml strings we've been generating up until now, I've committed the behavior described in the title ticket: null on empty. r8966
Hi, I tested with xml-spy the available solutions so this solutions are all acceptable with the xsd rules of GML 3.1.1
please notice that this instead give an error to validate test:
instead this is compliant with xsd validate:
So I Guess the better strategy is put always on the posList or pos tag the null, using
<posList /> or <pos />
regards,
Andrea.