[postgis-users] SRID and EPSG

Patrick van Laake patrick.vanlaake at home.nl
Tue May 27 13:11:13 PDT 2008


Hi Antonio,

The scripts are a replacement for the spatial_ref_sys table. In my
scripts instead, spatial_ref_sys is a view (meaning that it is a
description of what data is requested, it is constructed on-the-fly, the
data is automatically collected from the original EPSG tables) which is
compliant with the OGC specification. For postgis compatibility the proj
parameter options are added as well. Note that the latter is not linked
to the EPSG tables, nor is it complete; it is the version that Frank
Warmerdam published when I prepared the scripts.

You don't really NEED to know the EPSg structure to use the scripts;
just make sure that the EPSG tables are loaded in the same database with
the scripts and call spatial_ref_sys like you would otherwise have done.
Many more fantastic things can be done with EPSG, though, and a little
study can really help you do great things, such as finding which SRIDs
are defined for a particular area, or constructing a coordinate
conversion operation path through some complex intermediate CRSs. I have
done some of this already in another context. Again, if there is serious
interest from refractions I will happily share my knowledge.

All the best,
Patrick

On Tue, 2008-05-27 at 11:45 +0100, António Pestana wrote:
> Thanks Patrick. Minor problems with the formatting of the text files, easily
> solved... 
> 
> It seems to me that your work does an automatic conversion of the EPSG
> database into a spatial_ref_sys view/table. Did I understand correctly? I'm
> not the right guy to test with EPSG 6.15...
> 
> > -----Mensagem original-----
> > De: postgis-users-bounces at postgis.refractions.net 
> > [mailto:postgis-users-bounces at postgis.refractions.net] Em 
> > nome de patrick.vanlaake at home.nl
> > Enviada: terça-feira, 27 de Maio de 2008 10:47
> > Para: postgis-users at postgis.refractions.net
> > Assunto: [postgis-users] SRID and EPSG
> > 
> > The sql scripts can be found here: 
> > http://downloads.sourceforge.net/dspatial/PostgreSQL-CRS.zip. 
> > Note that v6.8 was used to develop this and EPSG is now at 
> > version 6.15 IIANM. Things should in all likelihood still work. 
> >  
> > Also note that nothing has happened in 2.5 years because no 
> > interest was expressed. That means that some features are 
> > still not developed, most notably writing a new WKT 
> > definition to the EPSG database. Since spatial_ref_sys is a 
> > view that involves writing a procedure that is triggered by 
> > the view object. Not too hard, but a lot of work. I reconfirm 
> > my availability to help implement it, if somebody can 
> > convince me that it will indeed be useful and used. Paul 
> > wasn't so hot on the idea then, where is refractions now??? 
> >  
> > Patrick 
> >  
> > -----Original Message-----
> > From: Barend Köbben
> > Sent: Tuesday, 27 May 2008 10:45
> > To: PostGIS Users Discussion
> > Cc: Patrick van Laake
> > Subject: Re: [postgis-users] SRID and EPSG 
> >  
> > Yes, it was Patrick van Laake (who happens to work at the 
> > same place as me). 
> > I've copied this to him, I guess he has those view 
> > definitions somewhere... 
> >  
> > --
> > Barend Köbben
> > International Institute for Geo-Information Sciences and 
> > Earth Observation (ITC) PO Box 6 7500AA Enschede, The Netherlands 
> > +31 (0)53 4874253
> >  
> >  
> >  
> > On 27-05-08 01:07, "Paul Ramsey" <pramsey at cleverelephant.ca> wrote: 
> >  
> > > If someone is interested in trolling the postgis-users back 
> > catalogue, 
> > > a user a couple years ago wrote a system of views that made 
> > the ESPG 
> > > relational structure usable as a spatial_ref_sys table.
> > > 
> > > P
> > > 
> > > On Mon, May 26, 2008 at 3:34 PM, Andy Anderson 
> > <aanderson at amherst.edu> wrote: 
> > >>> António Pestana <afsm.pestana at gmail.com> wrote: 
> > >>> 
> > >>>> What about 
> > >>>> 
> > http://www.epsg.org/databases/Discv6_15sql-PosgreSql.html ? Is it 
> > >>>> of any use? I'm really new to PostgreSQL and PostGIS, so may be 
> > >>>> this is a really dumb question...
> > >> 
> > >> On May 26, 2008, at 3:04 PM, Markus Schaber wrote: 
> > >>> 
> > >>> The EPSG database contains a rather complex relational 
> > structure of 
> > >>> different tables describing reference systems, projections etc.
> > >>> 
> > >>> This relationals tructure was originally delivered as 
> > access file, 
> > >>> but additional delivery formats (like PostgreSQL SQL 
> > dump) have been added.
> > >>> 
> > >>> The PostGIS spatial_ref_sys table itsself contains a "flattened" 
> > >>> view of some aspects of that relational model.
> > >>> 
> > >>> So the EPSG database cannot be loaded as spatial_ref_sys 
> > table, but 
> > >>> maybe an automatic conversion process could be developed.
> > >> 
> > >> 
> > >> Might it be useful to implement that relational table in PostGIS, 
> > >> along with functions that combine them to build a spatial 
> > reference? 
> > >> This might make it more usable in situations where you 
> > want to build 
> > >> your own (give me the WGS
> > >> 84 datum, a Lambert conformal conic with such-and-such standard 
> > >> parallels, and a coordinate origin at this point). Or is that just 
> > >> too uncommon and complicated for most users?
> > >> 
> > >> The current SRID table would still exist but be built at install 
> > >> time, of course.
> > >> 
> > >> -- Andy
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > No virus found in this incoming message.
> > Checked by AVG. 
> > Version: 8.0.100 / Virus Database: 269.24.1/1468 - Release 
> > Date: 5/26/2008 3:23 PM
> > 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list