[postgis-users] Custom Projection

Birgit Laggner birgit.laggner at vti.bund.de
Fri Jan 6 01:53:02 PST 2012


Hi Sean,

I picked the appropriate sql query from http://spatialreference.org/. 
It's just an example - you have to adjust it with your own proj4text and 
srid numbers and everything. But if you did so, you could project your 
geometries to this new projection (either with st_setsrid() or with 
st_transform(), whatever is appropriate to your data) and if you then 
export your shapefile with pgsql2shp, I would expect it to write a prj 
file with your custom projection.

This is the example insert statement, I mentioned above:

INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values ( 94326, 'epsg', 4326, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ', 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]');

Hope that helps,

Birgit.


Am 05.01.2012 21:44, schrieb Sean Christopher Conway:
> Hello, I would like to create a custom projection which is essentially 
> a variation on the geographic coordinate system EPSG 4326, i have 
> created one and the srtext is "GEOGCS["Geographic Coordinate 
> System",DATUM["WGS84",SPHEROID["WGS84",6378137,298.257223560493]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]""
>
>
> and the proj4text is this:
>
>
> "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 
> +y_0=0 +units=m +k=1.0 +nadgrids=@null +no_defs"
>
> My goal is to output a shapefile from postgis with a Geographic 
> coordinate system and the datum as : WGS84
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



More information about the postgis-users mailing list