Wednesday, July 26, 2006

MapServer, MapScript, CartoWeb

PHP http://www.php.net/
agrega interactividad a las paginas
http://localhost/mapserver/tutorial/example5-1.php
mas info:
http://mapserver.gis.umn.edu/docs/reference/phpmapscript-class/class-functions

gmap, para generar php, gmp75.phtml

CartoWeb (desarrollo de proyectos con CartoWeb)
http://www.cartoweb.org/
http://172.16.22.106/cartoweb/
Para comenzar con un proyecto, lo mejor es usar algo ya desarrollado, permite agregar o quitar funcionalidades
projects/ en la carpeta projects, se crea una nueva carpeta con el proyecto
xx.mp.in archivo inicial, al trabajarlo quedara como xxx.map
data/
icons/
vera/ fuentes que se utiliza
- Para crear un proyecto nuevo, duplicar una carpeta y renombrarla
ver documentacion: http://www.cartoweb.org/doc/cw3.2/xhtml/

Configuracion
[root@track7 cartoweb3]# cd /var/www/html/cartoweb3
[root@track7 cartoweb3]# php cw3setup.php --install --base-url http://localhost/cartoweb3
mod phpmapcsript debe cargarse dinamicamente:
[root@track7 server_conf]# vi server_conf/server.ini

; If false, CartoWeb will not run if you are using PHP as a
; module and return an error. Set it to true to disable the check.
disablePHPModuleCheck = false /* colocar a true

[root@track7 etc]# vi /etc/php.ini /* problemas con memoria en el server
memory_limit = 64M ; Maximum amount of memory a script may consume (8MB)
[root@track7 etc]# /etc/init.d/httpd start /* reiniciar el servicio, tambien service httpd restart

capas: editar layers.ini en /var/www/html/cartoweb3/projects/demoCW3/server_conf/demoCW3

estructura tipo objetos para las capas y sus children
; whether to generate class icons automatically
autoClassLegend = true

; layers
layers.root.className = LayerGroup
layers.root.children = background, human, categ, abel
layers.root.rendering = block

layers.background.className = LayerGroup
layers.background.label = Background
layers.background.rendering = radio
layers.background.children = nonelayer_, vector, raster

revisar la equivalencia de los layers en los archivos .map, deben ser los correspondientes

xhost + /* para abrir aplicaciones como root

-- Coffee break --

Programas utilitarios: legend, scalebar, shptree (crea un indice), etc.
http://mapserver.gis.umn.edu/docs/reference/utilityreference

Eje:
creando una nueva cartografia, con informacion de Ecuador
wget http://172.16.22.106/descargas/datos/ecuador.tar.gz
- QGis para generar las capas, cargar los shapes necesarios
- Para editar las tablas (borrar columnas innecesarias, y hacer mas ligero, usar el OpenJump, en la parte de editar esquemas

en QGIS cargar los shapes, y luego exportar como mapserver file/export as mapserver
generar el mapserver

No comments: