We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How can I convert this javascript to this java library?
var latitude = 37.42342342342342, longitude = -122.08395287867832; proj4.defs('EPSG:4326', "+title=long/lat:WGS84 +proj=longlat +a=6378137.0 +b=6356752.31424518 +ellps=WGS84 +datum=WGS84 +units=degrees"); proj4.defs('EPSG:20790', '+title=Hayford-Gauss Datum Lisboa (Militar) +proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=200000 +y_0=300000 +ellps=intl +towgs84=-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4,058 +pm=lisbon +units=m +no_defs'); var latlng = [latitude,longitude]; var pointDest = proj4('EPSG:20790', 'EPSG:4326', latlng); var coord = { long: pointDest[0], lat: pointDest[1] };
I've tried using the method factory.createFromParameters but I get all sorts of errors related with the parameters.
Any ideias?
The text was updated successfully, but these errors were encountered:
I've tried this but I get all sorts of errors:
double latitude = 37.42342342342342, longitude = -122.08395287867832; CRSFactory factory = new CRSFactory(); CoordinateReferenceSystem sourceCRS = factory.createFromParameters("EPSG:4326", "+title=long/lat:WGS84 +proj=longlat +a=6378137.0 +b=6356752.31424518 +ellps=WGS84 +datum=WGS84 +units=degrees\""); CoordinateReferenceSystem targetCRS = factory.createFromParameters("EPSG:20790", "+title=Hayford-Gauss Datum Lisboa (Militar) +proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=200000 +y_0=300000 +ellps=intl +towgs84=-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4,058 +pm=lisbon +units=m +no_defs"); CoordinateTransform transform = new CoordinateTransformFactory().createTransform(sourceCRS, targetCRS); ProjCoordinate srcCoord = new ProjCoordinate(latitude, longitude); ProjCoordinate destCoord = new ProjCoordinate(); transform.transform(srcCoord, destCoord);
Errors:
org.osgeo.proj4j.UnsupportedParameterException: Datum parameter is not supported
Sorry, something went wrong.
No branches or pull requests
How can I convert this javascript to this java library?
I've tried using the method factory.createFromParameters but I get all sorts of errors related with the parameters.
Any ideias?
The text was updated successfully, but these errors were encountered: