Ticket #1299 (closed enhancement: invalid)

Opened 18 months ago

Last modified 18 months ago

ST_UnknownSRID()

Reported by: dustymugs Owned by: pramsey
Priority: low Milestone: PostGIS Future
Component: postgis Version: trunk
Keywords: Cc:

Description

I'd like to see PostGIS provide a SQL function that output's the software's UNKNOWN_SRID. This would help at the present time where it looks like there still is discussion about 0 vs -1.

Also, nothing is stopping a user from changing UNKNOWN_SRID to something other than 0 or -1, say -9999. So a function ST_UnknownSRID would allow users of that PostGIS instance to know what that instance's unknown SRID is.

Heck, I'll write the patch and attach it if everyone is fine with it.

Change History

Changed 18 months ago by strk

The function implementation would be $$ SELECT ST_Srid('POINT(0 0)') $$

I'm not sure what you mean by "nothing is stopping a user from changing UNKNOWN_SRID".

Changed 18 months ago by dustymugs

  • status changed from new to closed
  • resolution set to invalid

Thanks strk! That's easy enough.

As for changing UNKNOWN_SRID, I meant SRID_UNKNOWN. A user could change the value of SRID_UNKNOWN in liblwgeom.h before compiling PostGIS.

Changed 18 months ago by strk

I wasn't necessarely against wrapping my implementation in a function... maybe an SQL one.

Changed 18 months ago by dustymugs

It'd be great if you could turn your implementation into an SQL function. I'm always hesitant to make changes to the PostGIS side.

Note: See TracTickets for help on using tickets.