Opened 6 years ago
Closed 5 years ago
#924 closed enhancement (fixed)
geometries returned by getGeometryN() should have the same SRID as collection
Reported by: | sirsigurd | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Default | Version: | main |
Severity: | Unassigned | Keywords: | |
Cc: | sirsigurd |
Description
Currently geometries returned by getGeometryN() always have SRID=0, because SRID is dropped for elements during geometry collection construction since r3840. I think it would be more correct if collection components have the same SRID as collection.
Change History (3)
comment:1 by , 6 years ago
Cc: | added |
---|
comment:2 by , 5 years ago
The proposed behavior (components have same SRID as collection) is consistent w/JTS:
-> GeometryFactory gf = new GeometryFactory(new PrecisionModel(), 4326); | Added variable gf of type GeometryFactory with initial value org.locationtech.jts.geom.GeometryFactory@21213b92 -> WKTReader reader = new WKTReader(gf); | Added variable reader of type WKTReader with initial value org.locationtech.jts.io.WKTReader@3327bd23 -> Geometry g = reader.read("GEOMETRYCOLLECTION(POINT (3 7), LINESTRING (0 0, 1 1))"); | Added variable g of type Geometry with initial value GEOMETRYCOLLECTION (POINT (3 7), LINESTRING (0 0, 1 1)) -> g.getSRID(); | Expression value is: 4326 | assigned to temporary variable $12 of type int -> g.getGeometryN(0).getSRID(); | Expression value is: 4326 | assigned to temporary variable $13 of type int -> g.getGeometryN(1).getSRID(); | Expression value is: 4326 | assigned to temporary variable $14 of type int
Note:
See TracTickets
for help on using tickets.
PR