[FWTools] Consuming FWTools utility from other project

Frank Warmerdam warmerdam at pobox.com
Wed May 18 13:51:17 EST 2011

On 11-05-18 12:44 PM, David Litvak wrote:
> I'm Making a front-end application for using ogr2ogr to upload files to a
> PostGIS database
> My problem is that when i use the -a_srs, -t_srs or -s_srs... the path for the
> proj_lib folder where the EPSG projs are stored is not defined... so i cant
> access them...
> The function that retrieves me the -a_srs, -s_srs or -t_srs string is
> toPostGisObject.getSistemaGeografico()
> which returns i.e. "-a_srs EPGS:4326 " when  WGS84 is selected at the Form...
> When running the process... it retrieves me the following error:
>    Failed to process SRS definition: EPGS:4326
> Is there any Enviroment variable or anything i have to set for redirecting the
> proj_lib path??


First, please ensure that you are using EPSG:4326 not EPGS:4326.  Second
you can set the PROJ_LIB and GDAL_DATA environment variables to point to
the relavent directories to ensure that PROJ.4 and GDAL can find their
coordinate system definitions.

The PROJ_LIB environment variable should point to a directory containing
the init file "epsg".  The GDAL_DATA environment variable should point to
a directory containing the files gcs.csv and pcs.csv.

Best regards,
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

More information about the FWTools mailing list