[mapserver-users] getting extent and integration from amiya

José María Michia jose.maria.michia at gmail.com
Fri Dec 12 00:52:40 PST 2008


> And regarding my 1st question u suggest one function............which I
> already wrote in PHP.(given below)......but I think u did not get this
> question also.....Actually I have several pictures(not raster data)  which I
> taken from google snapshot......but their extent is
> (0,0,456,567size=456X567)(0,0,567,657) like that......Look, all images have
> minx and miny 0.....so how I will convert this one to lat long form....or
> from where I will get lat long data.....I hope now u will get........and
> reply me soon..........

Ohh yes.. I understand. You need some control points. With control
points, you need some program for warping the images.

A  control point, is a point to which you know:

- coordinates on the image (pixel, google capture, 0-456,0-467)
- coordinates on a geographic system (ie lat lon)

Maybe is possible to acquire data for control point coordinates during
capture of google snapshots.

Maybe exists a better approach, is needed more detailed analisys of the case.

English is hard to me, don't worry when I am confused, . Sorry.

Saludos
José María

> Thanks...........
> Amiya Patra
>
>
>
>
> // Convert from image to map coordinates
>          function img2map($width,$height,$point,$ext)
>         {
>              $minx = $ext->minx;
>              $miny = $ext->miny;
>              $maxx = $ext->maxx;
>              $maxy = $ext->maxy;
>              if ($point->x && $point->y)
>             {
>                 $x = $point->x;
>                  $y = $point->y;
>                  $dpp_x = ($maxx-$minx)/$width;
>                  $dpp_y = ($maxy-$miny)/$height;
>                  $x = $minx + $dpp_x*$x;
>                  $y = $maxy - $dpp_y*$y;
>              }
>              $pt[0] = $x;
>              $pt[1] = $y;
>              return $pt;
>          }
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>



More information about the MapServer-users mailing list