Create shape file with projection readable in ArcGis with NetTopologeSuite

179 views
Skip to first unread message

Валентин Виноградский

unread,
Feb 9, 2012, 11:36:45 AM2/9/12
to nettopol...@googlegroups.com
Hi! I create correctly working shp file, and prj file to addition. The proof is correct view in QGis. But ArcGis says that spatial reference is missing. Does anybody know why?

I've use both with the same result


private void create_prj_file(string _filepath)
        {
            using (StreamWriter sw = new StreamWriter(_filepath + ".prj"))
            {
                //sw.Write(wgs84_37N.WKT);
                sw.Write(proj);
            }
        }

 proj = String.Format("PROJCS[\"WGS_1984_UTM_Zone_{0}{1}\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID"+
            "[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],"+
            "PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",500000.0],PARAMETER[\"False_Northing\",0.0]"+
            ",PARAMETER[\"Central_Meridian\",33.0],PARAMETER[\"Scale_Factor\",0.9996],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0]]",zone.zoneNum,zone.hampshire);

Diego Guidi

unread,
Feb 10, 2012, 2:41:07 AM2/10/12
to nettopol...@googlegroups.com
AFAIK: the ESRI WKT is not the same as the EPSG WKT.
Try to use
PROJCS["WGS_1984_UTM_Zone_37N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",39],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]

or make some experiments with data taken from http://spatialreference.org/ref/epsg/32637/

Валентин Виноградский

unread,
Feb 10, 2012, 5:01:37 AM2/10/12
to nettopol...@googlegroups.com
i'm sorry, didn't find any another way to say you "THANKS!!"

Diego Guidi

unread,
Feb 10, 2012, 11:24:49 AM2/10/12
to nettopol...@googlegroups.com
glad to be helpful :)
Reply all
Reply to author
Forward
0 new messages