<div dir="ltr"><br><div class="gmail_extra">Robert,</div><div class="gmail_extra"><br></div><div class="gmail_extra">I was actually using the vsicurl support from a prep-script similar to gdaltindex, not from in mapserver directly, so I don't have a handy example.  I'd also be concerned that accessing the data via /vsicurl/ would have performance problems that would make it unwise for direct access from MapServer.  One benefit of the S3 file system handlers is that they cache the files locally so multiple tile renders in mapserver from the file would be fast after the first fetch.  If you use /vsicurl/ then I don't think that local caching would occur between mapserver render requests.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Best regards,</div><div class="gmail_extra">Frank</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 5, 2014 at 12:07 PM, Robert Sanson <span dir="ltr"><<a href="mailto:Robert.Sanson@asurequality.com" target="_blank">Robert.Sanson@asurequality.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Frank.<br>
<br>
Do you have an example of a mapfile layer section using GDAL with vsicurl to retrieve GeoTIFFs?<br>
<br>
In my case I use a tileindex to access a directory of GeoTIFFs but we want to move them into S3. Here is a layer from my mapfile:<br>
<br>
LAYER<br>
  NAME sthl-075m-rural-2005-11<br>
  GROUP 'highres'<br>
  TYPE RASTER<br>
  STATUS ON<br>
  TILEINDEX ../../data/nz/sthl-075m-rural-2005-11_ind<br>
  TILEITEM Location<br>
  MAXSCALE 100000<br>
  METADATA<br>
   'ows_title' 'sthl-075m-rural-2005-11'<br>
   'wms_opaque' '1'<br>
   'wms_group_title' 'highres'<br>
   'wms_resx' '0.75'<br>
   'wms_resy' '0.75'<br>
   'ows_extent' '1088800.0 4743600.0 1314400.0 5089200.0'<br>
  END<br>
 END<br>
<br>
Thanks,<br>
<br>
Robert<br>
<br>
>>> Frank Warmerdam <<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>> 5/11/2014 1:45 p.m. >>><br>
<div class="HOEnZb"><div class="h5">Robert,<br>
<br>
I've done some variations on this.<br>
<br>
I'd encourage you to watch a video by Mark Korver on this topic from<br>
FOSS4G: <a href="http://vimeo.com/106833852" target="_blank">http://vimeo.com/106833852</a><br>
<br>
I used his NAIP bucket in "requestor-pays" mode successfully.  One thing<br>
that I ended up doing when reading the metadata was to use the vsicurl<br>
driver to access the tiffs, so only the required portions were fetched.<br>
His example actually mounts the whole bucket as a file system in which case<br>
things are much easier.<br>
<br>
I will note that when using vsicurl to access GeoTIFFs in S3 I found I had<br>
to set the following configuration variables to get it working.<br>
<br>
    # Various /vsicurl hackery to get it working with signed aws urls well<br>
    gdal.SetConfigOption('CPL_VSIL_CURL_ALLOWED_EXTENSIONS', 'ter')<br>
    gdal.SetConfigOption('GDAL_DISABLE_READDIR_ON_OPEN', 'YES')<br>
    gdal.SetConfigOption('CPL_VSIL_CURL_USE_HEAD', 'NO')<br>
<br>
I do quite a bit of stuff here with MapServer from S3, but I usually fetch<br>
from S3 and store in /tmp for serving so by the time MapServer sees the<br>
file it is completely normal.<br>
<br>
Best regards,<br>
Frank<br>
<br>
<br>
On Tue, Nov 4, 2014 at 2:56 PM, Robert Sanson <<br>
<a href="mailto:Robert.Sanson@asurequality.com">Robert.Sanson@asurequality.com</a>> wrote:<br>
<br>
> Does anyone have experience with using Amazon S3 to store GeoTIffs for use<br>
> as a back-end datastore accessible by Mapserver in order to create a WMS<br>
> service?<br>
><br>
> Thanks,<br>
><br>
> Robert Sanson<br>
><br>
><br>
> Robert Sanson Veterinary Epidemiologist<br>
> Batchelar Centre | Tennent Drive | Palmerston North<br>
> PO Box 585 | Palmerston North 4440 | New Zealand<br>
> p. <a href="tel:%2B64%206%20351%207990" value="+6463517990">+64 6 351 7990</a> | m. <a href="tel:%2B64%2021%20448%20472" value="+6421448472">+64 21 448 472</a> | f. <a href="tel:%2B64%206%20351%207919" value="+6463517919">+64 6 351 7919</a><br>
> e. <a href="mailto:robert.sanson@asurequality.com">robert.sanson@asurequality.com</a><br>
><br>
> Global experts in food safety and quality | <a href="http://www.asurequality.com" target="_blank">www.asurequality.com</a><br>
><br>
><br>
><br>
><br>
> This email and any attachments are confidential and intended solely for<br>
> the addressee(s). If you are not the intended recipient, please notify us<br>
> immediately and then delete this email from your system.<br>
><br>
> This message has been scanned for Malware and Viruses by Websense Hosted<br>
> Security.<br>
> <a href="http://www.websense.com" target="_blank">www.websense.com</a><br>
> _______________________________________________<br>
> mapserver-users mailing list<br>
> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
><br>
<br>
<br>
<br>
--<br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up   | Frank Warmerdam,<br>
<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/~warmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush    | Geospatial Software Developer<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">---------------------------------------+--------------------------------------<br>I set the clouds in motion - turn up   | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>light and sound - activate the windows | <a href="http://pobox.com/~warmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>and watch the world go round - Rush    | Geospatial Software Developer<br></div>
</div></div>