[postgis-users] Vacuum analyse ERROR: Operation on twoGEOMETRIESwith different SRIDs

Mark Cave-Ayland m.cave-ayland at webbased.co.uk
Wed Jun 15 04:22:59 PDT 2005


 

> -----Original Message-----
> From: Sergey Karin [mailto:sergey.karin at gmail.com] 
> Sent: 15 June 2005 12:06
> To: Mark Cave-Ayland (External)
> Subject: Re: [postgis-users] Vacuum analyse ERROR: Operation 
> on twoGEOMETRIESwith different SRIDs

(cut)

> Why I have the table with a column of geometries with 
> different SRIDs. I have many layers. And I want to group they 
> in some workspaces. So, I created a table, named WORKSPACE, 
> in this table each row describes one workspace. Of cource, I 
> want to save information about boundary of each workspace. 
> And of cource the boundaries can be in different SRIDs 
> dependently of SRIDs of layers, contained in given workspace. 
> So, I have a table with column containing geometries with 
> different SRIDs...


Hi Sergey,

I can see why you have gone for a column with mixed SRIDs now, but I'm still
not 100% convinced about allowing this. If you need geometries with SRIDs in
your application, I can see a workaround:

	select setSRID(boundary, srid) AS boundary, setSRID(start_point,
srid) AS 	start_point FROM workspaces WHERE id = X;

This would then allow you to set all your SRIDs to -1 in PostGIS, but return
geometries with SRIDs for your application. Note that if your application
doesn't need the SRID in the geometry directly then you can still read the
coordinates and the SRID directly, and then let your application behave
accordingly.


Thoughts anyone else?

Mark.

------------------------
WebBased Ltd
17 Research Way
Tamar Science Park
Plymouth
PL6 8BT 

T: +44 (0)1752 797131
F: +44 (0)1752 791023
W: http://www.webbased.co.uk





More information about the postgis-users mailing list