Difference between same projections types

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Difference between same projections types

Mustafa646
Below are the strings of same projection WGS1984

1.  (+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs )

2. GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]

3. EPSG: 4326

I know that above 3 represent same projection type. But Can anybody explain me why we use these different strings for the same projection? And when to use what? And what is the difference between these 3 types.

Reply | Threaded
Open this post in threaded view
|

Re: Difference between same projections types

Martin Desruisseaux
Hello Mustafa

Le 14/02/12 18:50, Mustafa646 a écrit :
> 1.  (+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs )
This syntax is Proj.4 specific, and may not be understood by other software
(unless those software provide a Proj.4 compatibility layer). Note however that
since many projects use Proj.4 for their internal map projections, they
indirectly use that syntax. For example the PostGIS extension to the PostgreSQL
database use Proj.4 internally, so its "spatial_ref_sys" table expect that
syntax. This is non-standard however.


> 2. GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS
> 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]
This syntax, named "Well Known Text" (WKT), has been standardized by the OGC
01-009 specification and is (in theory) an international standard. The syntax is
described here:

     http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/doc-files/WKT.html

Alternatively you can go straight to the source:
http://www.opengeospatial.org/standards/ct

This syntax is used in ".prj" file that sometime come with "TIFF + World File"
images for example. In theory, this syntax should be understood by many
software. In practice, different software understand it in different ways,
sometime because the standard had some room for interpretation, and sometime
because not every developers have implemented the standard correctly.

As a side note, the above WKT is note quite right. It is missing the axis order
declaration - so it is not a real definition for "EPSG:4326". It is rather a
definition for "CRS:84" (defined in WMS specification).

By the way, if there is any PostGIS developer reading this list... last time I
looked, the WKT defined in the PostGIS "spatial_ref_sys" table for France
Lambert projections declare a wrong "prime meridian" value (more specifically,
the units are wrong. It should be declared in gradiant - not degrees - because
the prime meridian shall inherits the unit of the enclosing GEOGCS. While some
other parts of the WKT specification are vague, this one is clear). I filled a
bug report to PostGIS years ago, but it doesn't seem to have been addressed...


> 3. EPSG: 4326
This one is only a reference to a definition which shall be provided elsewhere.
This is often a primary key in a database. Understanding this value require that
the software had a connection to an appropriate database. In this particular
case, the database is (or is derived from) the EPSG database: http://www.epsg.org

When using software that can understand such codes, providing the EPSG codes is
often both the easiest and the most accurate way to define the CRS (assuming
that the database used by the software doesn't contain errors).

Regards,

     Martin

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Difference between same projections types

support.mn
In reply to this post by Mustafa646
Hello,

the two first definitions are self sustained but the 3. definition needs a
database where the definition is kept. The problem with the 3. type is
that if the organisation that makes these definitions adds new ones the
old system trops out.

The two first definitions are better since if new definitions are added
the old system can also use them (since all information is given in the
definition it self). If you use a database to keep the references you
need to update that all the time to stay updated if new entries are added.

BTW: this is exactly the problem with some definitions in geotiff
standard. Luckily most creators put all data to the geotiff file and discard
any database but there are users that use the database. New version
of the standard should freeze that database and forbid adding new
entries to it and so force the use of the full definition at least for the
new entries. That would then stabilize the geotiff standard.

Regards: Janne.

------------------------------------

Mustafa646 [[hidden email]] kirjoitti:
> 1.  (+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs )
> 2. GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS
> 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]
> 3. EPSG: 4326
> And what is the difference between these 3 types.
>

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Difference between same projections types

peifer
On 15/02/2012 10:48, [hidden email] wrote:
> Hello,
>
> the two first definitions are self sustained...

Just to add that the first definition is sort of over-defined:
+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs

+datum=WGS84 resolves already to: +ellps=WGS84 +towgs84=0,0,0. So you
double-define the ellipsoid (which however doesn't harm). cs2cs -v says:

#--- following specified but NOT used
# +ellps=WGS84

+no_defs also doesn't have any impact in the above case.

Hermann

_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj