[OSRS-PROJ] Puzzled dabbler -- when do I need /nad?
Frank Warmerdam
warmerdam at pobox.com
Thu Mar 11 21:02:08 PST 2004
Tom Messenger wrote:
> As a dabbler who is only using the shpcs2cs function to convert a NAD27
> Lambert Conformal Conic shapefile to NAD83 latitude/longitude, I'm
> unsure if I need the grid shift files in subdirectory \nad. My example
> is a shapefile representing the geological formations on a geologic map
> of Arizona.
>
> My command line is
>
> shpcs2cs AZ_GEOL.shp AZ_GEOLll83.shp -v +proj=lcc +datum=NAD27
> +lon_0=-96 +lat_1=33 +lat_2=45 +lat_0=23 +x_0=5000000 +y_0=0 +to
> +proj=latlong +datum=NAD83
>
> and it seems to make no difference to the output whether conus.lla is in
> the \bin directory or not. With the low resolution of this particular
> file, it is hard to check whether the result is really NAD83 or not.
> Can you tell me what transformation cs2cs actually applies in this
> case? (I have seen suggestions in the documentation that the program
> doesn't complain if files are missing, it just skips steps that require
> them.) Am I missing a step? I'm not going to be using proj often
> enough to become an expert.
Tom,
I'm not sure where shpcs2cs comes from. I presume this is a version
of shpproj reimplemented to use the mechanisms of cs2cs? I seem to
recall someone having contributed that but I don't know the details.
The conus.lla file is raw ascii grid shift file. It isn't used directly.
First it has to be processed into a binary grid shift file with the nad2bin
program. I would guess it is being ignored.
If you just want to convert shapefiles, I would suggest using the
prepackaged OpenEV_FW 1.6.3 distribution which includes the ogr2ogr program
which can accomplish the same thing. The distribution also includes the
binary form of the grid shift files.
OpenEV_FW 1.6.3 can be found at:
ftp://ftp.remotesensing.org/gdal/openev/OpenEV_FW_163.zip
A command something like this would accomplish approximately what you were
trying to do:
ogr2ogr AZ_GEOLll83.shp AZ_GEOL.shp \
-s_srs '+proj=lcc +datum=NAD27 +lon_0=-96 +lat_1=33 +lat_2=45 +lat_0=23 +x_0=5000000 +y_0=0' \
-t_srs '+proj=latlong +datum=NAD83'
Of course it might be sufficient for you to run nad2bin on conus.lla to
produce conus and then ensure that the PROJ_LIB environment variable points
to the directory with the conus file.
Good luck,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.
More information about the Proj
mailing list