Opened 9 years ago
Closed 6 years ago
#724 closed defect (invalid)
Geometry methods do not preserve SRID
Reported by: | benmorel | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 3.6.3 |
Component: | Default | Version: | 3.4.2 |
Severity: | Unassigned | Keywords: | |
Cc: |
Description
Methods such as envelope(), boundary() etc. do not preserve the SRID in the resulting Geometry.
Take the following example, using PHP bindings:
$reader = new GEOSWktReader(); $g = $reader->read('POINT(1 2)'); $g->setSRID(4326); echo $g->getSRID(); // 4326 echo $g->boundary()->getSRID(); // 0 echo $g->envelope()->getSRID(); // 0
Change History (5)
comment:1 by , 7 years ago
Milestone: | 3.4.3 → 3.6.1 |
---|
comment:5 by , 6 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
SRID of constructed geometries is determined by the GeometryFactory
of g
, not the SRID of g
. To construct geometries in a given SRID, the WKTReader
should be constructed with a reference to a GeometryFactory
having the desired SRID.
Note:
See TracTickets
for help on using tickets.
Ticket retargeted after milestone deleted