Hi Daniel,<div><br></div><div>Thanks for your comments. Your concerns are valid about the performance. But writing a script to convert images to shapefiles would likely provide similar performance. With regards to the usability, having a driver (and the use of ogr2ogr) would be more convenient even if that's used mostly as an offline solution. I'm not too satisfied with the practice of outsourcing significant tasks to external (language specific) scrips as "official" tools. This requires the user to be prepared to install further things (like runtime environments, additional libraries etc) in order to have the things up and running. The concept of having a new driver would provide further possibilities related to the common object model (like having OGR SQL to work)</div>
<div><br></div><div>Best regards,</div><div><br></div><div>Tamas</div><div><br></div><div><br></div><div><br></div><div><br><div class="gmail_quote">2012/7/23 Daniel Morissette <span dir="ltr"><<a href="mailto:dmorissette@mapgears.com" target="_blank">dmorissette@mapgears.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If I understand correctly, in the Open() call, this driver would open each image file to read its EXIF info and index the files in memory? This would work fine with a dozen images, but as the number of images increases the performance will suffer a lot and this would become unusable in apps such as MapServer, and even for Desktop apps with hundreds of images.<br>

<br>
If I needed this kind of functionality myself I would use a script to create an OGR point file as suggested by Even, to avoid the overhead caused by opening all the images.<br>
<br>
My 0.02$<br>
<br>
Daniel<div class="im"><br>
<br>
<br>
On 12-07-23 5:27 AM, Tamas Szekeres wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Hi Even,<br>
<br>
I just want to use the directory name to define the connection to the<br>
images, we could also provide to scan the files in subdirectories if<br>
needed. I would prefer to have a new driver not just an offline tool for<br>
creating OGR datasets, in this case many existing applications (like<br>
MapServer) would be capable to utilize this feature.<br>
I could imagine a driver configuration file to specify which driver<br>
should be used for a particular image format and where the specific<br>
information is located, I don't require to harmonize the metadata<br>
structure at this time. We should probably allow mixing jpegs and tiffs<br>
in the same directory, but the configuration should specify how the<br>
similar attributes are provided by each (sub)driver.<br>
<br>
Best regards,<br>
<br>
Tamas<br>
<br>
<br>
<br>
2012/7/23 Even Rouault <<a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a><br></div>
<mailto:<a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-<u></u>paris.org</a>>><div><div class="h5"><br>
<br>
    Le lundi 23 juillet 2012 09:51:14, Tamas Szekeres a écrit :<br>
     > Hi All,<br>
     ><br>
     > We're thinking about implementing a new OGR driver which would<br>
    represent a<br>
     > set of images as a vector data source. The images are taken from<br>
    any GPS<br>
     > compatible mobile device, and each picture would be represented<br>
    as a point<br>
     > feature, the positions would be extracted from the exif<br>
    information. The<br>
     > file name and path would be provided as an attribute for each<br>
    feature. This<br>
     > data source could then be used by higher level apps to provide<br>
    symbols at<br>
     > the picture locations in the map and display the picture when the<br>
    feature<br>
     > is selected. The driver would definitely use GDAL to extract<br>
    information<br>
     > about the provided images.<br>
     ><br>
     > I'm not sure whether we already have some kind of alternative<br>
    solution to<br>
     > this, let me know if you know about any. Further ideas about this<br>
    topic<br>
     > would also be helpful.<br>
<br>
    The JPEG driver already exposes EXIF information if found :<br>
<br>
    $ gdalinfo ../autotest/gdrivers/data/<u></u>albania.jpg<br>
    Driver: JPEG/JPEG JFIF<br>
    Files: ../autotest/gdrivers/data/<u></u>albania.jpg<br>
    Size is 361, 260<br>
    Coordinate System is `'<br>
    Metadata:<br>
    [...]<br>
       EXIF_GPSLatitude=(41) (1) (22.91)<br>
       EXIF_GPSLatitudeRef=N<br>
       EXIF_GPSLongitude=(19) (55) (42.35)<br>
       EXIF_GPSLongitudeRef=E<br>
    [...]<br>
<br>
    $ gdalinfo ../autotest/gcore/data/exif_<u></u>and_gps.tif -mdd EXIF<br>
    Driver: GTiff/GeoTIFF<br>
    Files: ../autotest/gcore/data/exif_<u></u>and_gps.tif<br>
    Size is 1, 1<br>
    Coordinate System is `'<br>
    [..]<br>
    Metadata (EXIF):<br>
    [...]<br>
       EXIF_GPSLatitude=(77) (5) (60)<br>
       EXIF_GPSLatitudeRef=S<br>
       EXIF_GPSLongitude=(34) (12) (0)<br>
       EXIF_GPSLongitudeRef=E<br>
    [..]<br>
<br>
    Are you thinking to other raster formats to extract EXIF info from?<br>
    To my<br>
    knowledge, the JPEG driver, and recently the GTiff driver, are the<br>
    only one<br>
    that extract EXIF for now. I see that the JPEG driver exposes it in the<br>
    default metadata domain, whereas I chose EXIF for the GTiff driver.<br>
    For GTiff,<br>
    the specific EXIF metadata domain seemed better to me to avoid<br>
    'polluting' the<br>
    default metadata domain, but I didn't want to change the JPEG driver<br>
    at that<br>
    point. But this would probably requires some harmonization.<br>
<br>
    So with some scripting, you could create for example a point<br>
    shapefile, with<br>
    the filename as attribute and GPS position as geometry.<br>
<br>
    In its syntax, this could be something similar to gdaltindex.<br>
<br>
    Doing that as a OGR driver would be also doable of course. The only<br>
    point to<br>
    solve is the definition of the connexion string to specify the image<br>
    set.<br>
<br>
     ><br>
     > Best regards,<br>
     ><br>
     > Tamas<br>
<br>
<br>
<br>
<br></div></div><div class="im">
______________________________<u></u>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/gdal-dev</a><br>
<br>
</div></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
-- <br>
Daniel Morissette<br>
<a href="http://www.mapgears.com/" target="_blank">http://www.mapgears.com/</a><br>
Provider of Professional MapServer Support since 2000</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br></div>