2

Sorry, I am newbie with GeoTIFF files. I want to create a project that a person can upload a GeoTIFF file and the web application saves the lat/long of the picture into the database, the server side programming based on php and the database is MySQL.

Is there a library or a way to read and extract information of a GeoTIFF picture with php or javascript?

  • Are you sure you mean GeoTIFF, and not the location stored in a picture's EXIF tags? You can read the latter with PHP's exif_read_data function. If the file really is a GeoTIFF, this question's a duplicate of How to read GeoTIFF using PHP?. – scruss Sep 13 '14 at 18:37
3

there is a php extension called php-gdal

I found some install instructions: https://www.drupal.org/node/2133103

the main site: https://github.com/geonef/php5-gdal

helpful? http://dl.maptools.org/dl/php_ogr/php_ogr_documentation.html

I looked at scruss' suggestion: ( How to read GeoTIFF using PHP? ) and downloaded the code to take a look at. I'm not convinced it is what you need. Close, but I think you'll find yourself stripping most of the code away and possible need to add some of your own. Best to try and find something pre-made. Hopefully the php-gdal will work for you. I have not tried it but use gdal in python regularly and it is great.

Be sure to let us know how it goes.

another possibility: http://www.invet.net/images/catalog/creating_maps.pdf

0

You need to read the location from the Geotiff header. Full documentation can be found at http://trac.osgeo.org/geotiff/ . I do not think it stores the center so you may have to take the 4 boundaries and average. You have a few choices including some APIS. as for direct read using javascript or php I do not know of a way. Anyway I think listgeo is a good starting point.

  • thank you for your attention , i searched any where and read many documents but cant find the solution,i just need the coordinate of boundaries – Tee Sep 13 '14 at 15:22
  • But this does have it, I have used it remotesensing.org/geotiff/listgeo.html It gives your the coordinates – If you do not know- just GIS Sep 13 '14 at 16:31
  • sorry but i dont know how use it , perhabs this application based on windows , is there any example?? – Tee Sep 13 '14 at 17:15

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.