[geos-devel] [GEOS] #924: geometries returned by getGeometryN() should have the same SRID as collection

GEOS geos-trac at osgeo.org
Thu Dec 27 17:02:30 PST 2018


#924: geometries returned by getGeometryN() should have the same SRID as
collection
-------------------------+---------------------------
 Reporter:  sirsigurd    |       Owner:  geos-devel@…
     Type:  enhancement  |      Status:  new
 Priority:  major        |   Milestone:
Component:  Default      |     Version:  master
 Severity:  Unassigned   |  Resolution:
 Keywords:               |
-------------------------+---------------------------

Comment (by dbaston):

 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 at 21213b92

 -> WKTReader reader = new WKTReader(gf);
 |  Added variable reader of type WKTReader with initial value
 org.locationtech.jts.io.WKTReader at 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

 }}}

 {{{

 }}}

-- 
Ticket URL: <https://trac.osgeo.org/geos/ticket/924#comment:2>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).


More information about the geos-devel mailing list