[Mapserver-users] Shapefile cut-out

Stefan Schwarzer stefan.schwarzer at grid.unep.ch
Wed Apr 9 03:12:34 EDT 2003


--=====================_402814246==.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

Hi list,

I am fighting in the moment for clear thoughts in my dusty brain. Perhaps 
somebody could help me out...

I have a bundle of national statistical data sets which cover the whole 
world (GDP, Arable Land, etc...). I serve them via MapScript as Shapefiles 
to my map-module, but at the same time in another non-map module as raw 
values via my MySQL database.

Now I want to enable the user to pre-select a region like Europe or Africa. 
This cut-out should then not only be displayed as a map, but be available 
as a zipped shapefile for download.

I read through the posts of the list and found the "ms_newShapeFileObj" 
command as a possible solution. I would then probably query the global data 
set and "paste" the records into the new -regional- shapefile. Another 
possibility would perhaps be to copy the original file and just delete the 
unnecessary entries. Or I would have already created the regional files, 
but without the data, and would then fill them via the MySQL database.

Does anyone have experiences with zipping files in PHP?

Any hints, ideas and code-examples are very much appreciated.

Best wishes,

Stefan

P.S.: I am using MapScript 3.5, PHP, Apache, NT/Linux.


         _______________________________________

         Stefan Schwarzer
         Consultant on GEO

         UNEP/DEWA/GRID-Geneva
         Chemin des Anemones 11
         CH - 1219 Chatelaine
         Switzerland

         Tel: (+41) 22.917.83.49
         Fax: (+41) 22.917.80.29

         Email: stefan.schwarzer at grid.unep.ch
         Internet: http://geodata.grid.unep.ch/
         _______________________________________ 
--=====================_402814246==.ALT
Content-Type: text/html; charset="us-ascii"

<html>
<body>
Hi list,<br><br>
I am fighting in the moment for clear thoughts in my dusty brain. Perhaps
somebody could help me out...<br><br>
I have a bundle of national statistical data sets which cover the whole
world (GDP, Arable Land, etc...). I serve them via MapScript as
Shapefiles to my map-module, but at the same time in another non-map
module as raw values via my MySQL database.<br><br>
Now I want to enable the user to pre-select a region like Europe or
Africa. This cut-out should then not only be displayed as a map, but be
available as a zipped shapefile for download. <br><br>
I read through the posts of the list and found the
&quot;ms_newShapeFileObj&quot; command as a possible solution. I would
then probably query the global data set and &quot;paste&quot; the records
into the new -regional- shapefile. Another possibility would perhaps be
to copy the original file and just delete the unnecessary entries. Or I
would have already created the regional files, but without the data, and
would then fill them via the MySQL database.<br><br>
Does anyone have experiences with zipping files in PHP?<br><br>
Any hints, ideas and code-examples are very much appreciated.<br><br>
Best wishes,<br><br>
Stefan<br><br>
P.S.: I am using MapScript 3.5, PHP, Apache, NT/Linux.<br><br>
<x-sigsep><p></x-sigsep>
<font size=3><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>_______________________________________<br><br>
</font><font size=2><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab><b>Stefan
Schwarzer<br>
</b><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Consultant
on GEO<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>UNEP/DEWA/GRID-Geneva<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Chemin des
Anemones 11<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>CH - 1219
Chatelaine<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Switzerland<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Tel: (+41)
22.917.83.49<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Fax: (+41)
22.917.80.29<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Email:
stefan.schwarzer at grid.unep.ch<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Internet:
<a href="http://geodata.grid.unep.ch/" eudora="autourl">http://geodata.grid.unep.ch/</a><br>
</font><font size=3><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>_______________________________________</font></body>
</html>

--=====================_402814246==.ALT--




More information about the mapserver-users mailing list