[Cartoweb-users] creating new projects
Yves Jacolin
yjacolin at free.fr
Thu Jan 18 03:50:03 EST 2007
Hi Andre,
For one of my project I create a php script which can create some config
file : mapfile, layers.ini and outline.ini file if wanted.
You can download the script here :
http://wiki.gloobe.org/doku.php?id=cw3_scripts
With some informations (in french sorry).
A short explanation :
php-cgi scripts/makemapfile.php --install --project script
--data-dir /var/local/ --outline --layers
--filter 18,36,37,28,41 --postgis pgsql://postgres:postgres@localhost/edit_db
--install : run the script
--project : create files for this projects
--data-dir : use this directory to retrieve spatial data and some config
files. The script use the directory tree to create the same tree in the
layer.ini file
--outline : option to set up outline.ini file
-- layers : option to create layers.ini file
-- filter : do not use file which contains this word
--postgis : create postgis layers in the mapfile and in the layers.ini files.
Use the geometry table to do so.
Config :
You have to create some config file :
* /url/path/
* /url/path/config/
* /url/path/config/config.ini
* /url/path/config/raster.ini
* /url/path/config/vector.ini
* /url/path/rep1/fichier2.shp
* /url/path/fichier1.shp
* ...
/url/path is your dataDir option.
config.ini is the header of the mapfile !
raster.ini and vector.ini are special config file. If you use a name close to
one of your spatial data, this file will be used for the class parameter.
Ths script is licenced under a GPL licence. Do not hesitate to improve it ;-)
Y.
Le Jeudi 18 Janvier 2007 07:35, Andre Schoonbee a écrit :
> I have a few questions in creating a new project:
>
>
>
> a) If I have a complex mapserver map file (or any mapfile) is there a
> standard application or utility that can help in generating the layers.ini,
> or is all manual editing??
>
> b) What cause the following error:
>
>
>
> Warning:
> parse_ini_file(C:\wamp\www\cartoweb3/server_conf/Trumpet/Trumpet.ini)
> [function.parse-ini-file
> <http://localhost/cartoweb3/htdocs/function.parse-ini-file> ]: failed to
> open stream: No such file or directory in
> C:\wamp\www\cartoweb3\server\ServerContext.php on line 487
>
> Warning:
> parse_ini_file(C:\wamp\www\cartoweb3/server_conf/Trumpet/Trumpet.ini)
> [function.parse-ini-file
> <http://localhost/cartoweb3/htdocs/function.parse-ini-file> ]: failed to
> open stream: No such file or directory in
> C:\wamp\www\cartoweb3\common\StructHandler.php on line 59
>
> Warning: Invalid argument supplied for foreach() in
> C:\wamp\www\cartoweb3\common\MapInfo.php on line 219
>
> Warning: filemtime() [function.filemtime
> <http://localhost/cartoweb3/htdocs/function.filemtime> ]: stat failed for
> C:\wamp\www\cartoweb3/server_conf/Trumpet/Trumpet.ini in
> C:\wamp\www\cartoweb3\server\ServerContext.php on line 297
>
> Fatal error: Uncaught exception 'CartocommonException' with message 'Error
> [2, Cannot modify header information - headers already sent by (output
> started at C:\wamp\www\cartoweb3\server\ServerContext.php:487),
> C:\wamp\www\cartoweb3\client\FormRenderer.php, 447] Backtrace: file:
> UNKNOWN - UNKNOWN call: Common::cartowebErrorHandler(2, "Cannot modify
> header information - headers already sent by (outp...",
> "C:\wamp\www\cartoweb3\client\FormRenderer.php", 447, Array(1)) file: 447 -
> C:\wamp\www\cartoweb3\client\FormRenderer.php call: header("HTTP/1.1 500
> Internal Server Error") file: 1226 -
> C:\wamp\www\cartoweb3\client\Cartoclient.php call:
> FormRenderer->showFailure(Object(SoapFaultWrapper)) file: 38 -
> C:\wamp\www\cartoweb3\htdocs\client.php call: Cartoclient->main() file: 3 -
> C:\wamp\www\cartoweb3\htdocs\Trumpet.php call:
> require_once("C:\wamp\www\cartoweb3\htdocs\client.php") ' in
> C:\wamp\www\cartoweb3\common\Common.php:290 Stack trace: #0 [internal
> function]: Common::cartowebErrorHandler(2, 'Cannot modify h...', 'C:\wa in
> C:\wamp\www\cartoweb3\common\Common.php on line 290
>
>
>
> Thanks
>
>
>
> Andre
>
> Office: +264 61 209 2844
>
> Mobile: +264 81 278 5800
--
Yves Jacolin
---
http://yjacolin.gloobe.org
More information about the Cartoweb-users
mailing list