Opened 8 years ago

Closed 8 years ago

#593 closed defect (worksforme)

WKB Should output SRID of 0

Reported by: cfis Owned by: geos-devel@…
Priority: major Milestone: 3.3.6
Component: Default Version: 3.3.5
Severity: Unassigned Keywords:
Cc:

Description

Postgis 2.x now assumes that 0 represents an "unknown" srid. So in our db we have an enforce_srid constraint that says the srid should be 0 when storing indoor features.

Problem is geos intentionally doesn't output a 0 srid, here is the code:

void WKBWriter::writeSRID(int SRID) {

if (includeSRID && SRID != 0)

writeInt(SRID);

}

This breaks our app because when it inserts a record to postgis it sends the new geometry using the wkb format. Since geos doesn't emit the 0 srid, the enforce constraint fails because the srid isn't set at all (and we want it to be 0).

Could this check be removed to bring geos in line with postgis?

Change History (2)

comment:1 Changed 8 years ago by strk

Absence of SRID is considered to be the same as SRID=0 by PostGIS. What does your postgis_full_version() say ?

comment:2 Changed 8 years ago by strk

Resolution: worksforme
Status: newclosed

lack of feedback

Note: See TracTickets for help on using tickets.