Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CreateFromWkt() in a Xamarin.Android project #27

Open
JasonKost opened this issue Feb 24, 2018 · 1 comment
Open

CreateFromWkt() in a Xamarin.Android project #27

JasonKost opened this issue Feb 24, 2018 · 1 comment

Comments

@JasonKost
Copy link

JasonKost commented Feb 24, 2018

I am attempting to use a CoordinateSystemFactory in order to project a wgs84 latitude/longitude into a state plane coordinate system. I have tried using the current stable version (1.3.0.4) and a few 1.3.2 pre-release versions too.

This code generates a run-time exception:

CoordinateSystemFactory csFact = new CoordinateSystemFactory();
var nebraska = csFact.CreateFromWkt("PROJCS[\"NAD83(HARN) / Nebraska\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Regional_Network\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",43],PARAMETER[\"standard_parallel_2\",40],PARAMETER[\"latitude_of_origin\",39.83333333333334],PARAMETER[\"central_meridian\",-100],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AUTHORITY[\"EPSG\",\"2819\"]]");

The exception message string is "'P' is not recognized."

I have tried many other WKT strings too, all with the same result.

I saw a similar issue here. That issue was apparently resolved by using version 1.3.2-pre1, but I have tried both 1.3.2-pre1 and 1.3.2-pre004 and the exception persists.

Is there any other way to transform to state plane coordinates that would bypass the parsing that CreateFromWkt() does?

@FObermaier
Copy link
Member

Is this resolved?

@FObermaier FObermaier added this to In progress in ProjNet V2 Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
ProjNet V2
  
In progress
Development

No branches or pull requests

2 participants