[mapserver-users] zipped shapefile

Jeff McKenna jmckenna at gatewaygeomatics.com
Wed Jun 22 16:03:03 PDT 2016


I had tried that also.  I am unable to get this to work with MapServer 
7.0.1 (MS4W 3.1.4).  No problems with ogrinfo.

-jeff


-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 2016-06-22 7:52 PM, Michael Smith wrote:
> You need to include the name of the shapefile in the DATA statement, eg
> DATA "/vsizip/myzipfile.zip/shapefile.shp"
>
> Mike
>
> ----
> Michael Smith
>
> US Army Corps
> Remote Sensing GIS/Center
> michael.smith at usace.army.mil
>
>
>
>
> -----Original Message-----
> From: mapserver-users <mapserver-users-bounces at lists.osgeo.org> on behalf
> of Jeff McKenna <jmckenna at gatewaygeomatics.com>
> Date: Wednesday, June 22, 2016 at 6:46 PM
> To: <mapserver-users at lists.osgeo.org>
> Subject: Re: [mapserver-users] zipped shapefile
>
>> I'm also unable to get this to work.  I agree that it should (with the
>> layer specified in the "DATA" statement), but I can't seem to get
>> MapServer 7.0.1 to draw a map.  The error message is quite generic:
>>
>>   OGROpen(/vsizip/test.zip)
>>   msOGRFileOpen(): OGR error. Open failed for OGR connection in layer
>> 'test'.  File not found or unsupported format.
>>
>>
>> I believe you have found a nice enhancement.  I think you should file
>> this in the issue tracker: https://github.com/mapserver/mapserver/issues
>>
>>
>> -jeff
>>
>>
>>
>> --
>> Jeff McKenna
>> MapServer Consulting and Training Services
>> http://www.gatewaygeomatics.com/
>>
>>
>>
>>
>> On 2016-06-22 5:57 PM, lagrange123 wrote:
>>> Hi,
>>>
>>> I have a bunch of shapefiles in zip format for disk space reasons. And I
>>> want to be able to server their contents with mapserver. Is this
>>> possible?
>>>
>>> I was thinking that I could use CONNECTIONTYPE OGR. And then, since
>>> gdal/ogr
>>> can read a zipped data source (per
>>> https://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip), this would enable
>>> mapserver to serve such a data source. However, I am not having much
>>> luck,
>>> and I don't know if this is even supported in mapserver.
>>>
>>> My layer definition is:
>>>
>>> LAYER
>>> 		NAME "my_shapefile"
>>> 		CONNECTIONTYPE OGR
>>> 		CONNECTION "/vsizip/path/to/file.zip"
>>> 		TYPE POLYGON
>>> 		STATUS ON
>>> END
>>>
>>>


More information about the mapserver-users mailing list