[Proj] Differences in reprojection between using the cs2cs app and using the api

Hermann Peifer peifer at gmx.eu
Thu Feb 12 13:23:39 EST 2015


Hi again,

In simple terms, EPSG:4326 is THE code for WGS84 lat/lon coordinates. It 
resolves to:

$ testepsg epsg:4326
...
PROJ.4 rendering of [epsg:4326] = +proj=longlat +datum=WGS84 +no_defs

In return, +datum=WGS84 is a shortcut for:

$ cs2cs -ld
__datum_id__ __ellipse___ __definition/comments__
    WGS84         WGS84        towgs84=0,0,0

I have no experience with using the API and no clue what (good) reasons 
would explain the observed differences.

Hermann



On 2015-02-12 13:22, Adri CS wrote:
> Hi!
>
> You're right, Hermann. The codes are different because I made a mistake
> when copy/pasting. The correct EPSG codes are the ones I use with the
> api: /32723 /for the source and /31983/ for the target.
>
> The input coordinates are from the Rodovida dos Tamoios. which falls in
> the UTM zone 23 S. Since they're in lat/long format, I just googled
> /"WGS84 utm 23s" /in Google and found THIS
> <http://www.spatialreference.org/ref/epsg/wgs-84-utm-zone-23s/>.
>
> I'm using /"+init=epsg:32723 +proj=latlong"/ beacuse I thought this
> would initialize the projPJ var with the SIRGAS 2000 system (ellipsoid
> and so.) and then, with the /latlong/ string, I would made the system
> aware that the input coords will be in the lat/long form.
>
> As you suggest, using /epsg:4326 /for the source system works fine. May
> I ask you what has this code of special?
>
> /********************************************************************/
>
> José, so supposing that I got the projection systems right (see
> Hermann's answer), should I expect this little differences due to rounding?
>
> Thanks and cheers!
> Adri.
>
>
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
>



More information about the Proj mailing list