1

I'm trying to find a way to convert EPSG:28992 to Google Maps' lat/lon using PHP. Is this possible?

I'm trying to convert XYZ: 137634.397 455715.439 0.0.

I'm using Kadaster, which is a Dutch government product. If you need any more information, please ask!

  • You only want a solution in PHP? If yes, please update your question title and add PHP as a tag. – Iris Sep 4 '15 at 12:19
  • note that google maps projection is a mercator projection. The most common Lat/long is WGS 84 (EPSG 4326) – radouxju Sep 4 '15 at 13:11
2

Yes this can be done using http://proj4js.org/ you can find your parameters here http://spatialreference.org/ the rest is just code. I have a similar php script in a web page that converts from State Plane Coordinates into Lat/Long EPSG 4326. It basically follows this logic, ignore the extraneous stuff, that i think can be applied to your problem.

points = new Array();
noaa_points = new Array();
var p;
var thispoint;

Proj4js.defs["'.$zone_id.'"] = "'.$zone_vars.'";

var dest = new Proj4js.Proj("EPSG:4326");  /* Lat and Lon projection */
var source = new Proj4js.Proj("'.$zone_id.'");

';

##############################

if ($_REQUEST['n'] && $_REQUEST['e']) {

    echo '

 p = new Proj4js.Point('.$_REQUEST['e'].','.$_REQUEST['n'].');
 Proj4js.transform(source,dest,p);
  points.push({num:1,north:"'.$_REQUEST['n'].'",east:"'.$_REQUEST['e'].'",zone:"'.     $zone_name.'",elev:0,desc:"Single Converted      Point",lat:p.y,lng:p.x,noaalat:0,noaalng:0});

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.