1

I have a colleague producing maps with the following Python Basemap projection:

from mpl_toolkits.basemap import Basemap
m = Basemap(width=6000000,height=3900000,
        resolution='l',projection='eqdc',\
        lat_1=45.,lat_2=55,lat_0=38,lon_0=-97.)
print(m.proj4string)

With a proj4 string of:

+y_0=1949999.9999999986 +units=m +lon_0=-97.0 +x_0=3000000.0000000014 +proj=eqdc +lat_0=38.0 +R=6370997.0 +lat_2=55.0 +lat_1=45.0 

I'd like to match this in GRASS.

 g.proj -c proj4="proj4string from above" location=EQDC

Gives an error:

WARNING: Datum <unknown> not recognised by GRASS and no parameters found
Location <EQDC> created

I'm used to working in GRASS and using projections defined by GeoTIFF files, reprojecting, etc. I've created custom views in Python like above. But have not yet figured out how to tell GRASS to create something with the detail that I can in Python.

  • Try +proj=eqdc +lat_0=38 +lon_0=-97 +lat_1=45 +lat_2=55 +x_0=3000000 +y_0=1950000 +a=6370997 +b=6370997 +units=m +no_defs. This works with QGIS, maybe GRASS too. – AndreJ Apr 17 '16 at 5:58
  • Same error. Seems to be the same string but with some numbers rounded? – mankoff Apr 17 '16 at 11:11
  • I took your string as a custom CRS in QGIS, and saved a WGS84 dataset to it. Have you tried the string in the GRASS GUI? I get no error message, and can see the shapefile created in QGIS in that projection. – AndreJ Apr 17 '16 at 13:23
0

I can match the two if I add a datum and remove the x_0 and y_0 parameters to/from the proj4 string:

In GRASS:

g.proj -c proj4="+proj=eqdc +lat_0=38 +lon_0=-97 +lat_1=45 +lat_2=55 +x_0=0 +y_0=0 +a=6370997 +b=6370997 +units=m +no_defs +datum=wgs84" location=EQDC
g.mapset mapset=PERMANENT location=EQDC

g.region -l
g.region e=e+2500000 w=w-2500000 n=n+2000000 s=s-2000000 res=1000

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.