[Qgis-developer] script to update the srs.db
Maciej Sieczka
tutey at o2.pl
Wed Jun 11 16:55:36 EDT 2008
Tim Sutton pisze:
> Hi Richard
>
> One thing I would like to do if you assemble small test datasets is
> to create some unit tests for srs stuff. One basic form of test I am
> thinking is to simply have a directory with a bunch of shapefiles
> with a single feature each, each shp being in a different srs. The
> test would load each one in turn and verify that it gets the correct
> epsg etc for it. So if you so start getting little test files in,
> bear this in mind so that we can use them for more formal unit
> testing too.
> Secondly if I recall correctly, the reason we originally opted to use
> our own srs identifier was that the srs db did inclide some srs
> definitions that did not have an epsg code yet.
Please anybody who knows details speak up!
> It would be good if we could maintain the original srs id pkeys in
> any updates you do
This could be done with some extra work, but I don't think
QGIS should depend on it's own SRS numbering scheme, when EPSG provides
an universal, stable scheme for that. That's what EPSG database is good
at and let's make use of it if possible.
> since changing them may introduce regressions for people loading .qgs
> project files.
In a .qgs the layer's and on the <mapcanvas> SRS part looks like this:
<spatialrefsys>
<proj4>+proj=tmerc +lat_0=0 +lon_0=19 +k=0 +x_0=500000 (snip...)
<srsid>181</srsid>
<srid>2180</srid>
<epsg>2180</epsg>
<description>ETRS89 / Poland CS92</description>
<projectionacronym>tmerc</projectionacronym>
<ellipsoidacronym>GRS80</ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
The <properties> SRS (how does differ from the <mapcanvas> one???) is eg.:
<SpatialRefSys>
<ProjectSRSProj4String type="QString" >+proj=tmerc +lat_0=0 (snip...)
<ProjectSRSID type="int" >181</ProjectSRSID>
</SpatialRefSys>
Which tag does QGIS depend on to recognize the project's SRS? Does it
consider the <srsid> or <ProjectSRSID type="int" > at all?
Cheers,
Maciek
--
Maciej Sieczka
www.sieczka.org
More information about the Qgis-developer
mailing list