Commit bd88781b authored by Misael Curril's avatar Misael Curril

Archivos necesario para la instalacion del servidor de mapas

parent 7b5fdbf7
sans /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
sans-bold /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf
# Copiar archivos fonts, symbols y stp.map en directorio /opt
yum install http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-2.noarch.rpm
yum install postgresql93.x86_64 postgresql93-contrib.x86_64 postgresql93-server.x86_64
yum install postgis2_93.x86_64
/usr/pgsql-9.3/bin/postgresql93-setup initdb
#editar /var/lib/pgsql/9.3/data/postgresql.conf
#editar /var/lib/pgsql/9.3/data/pg_hba.conf
systemctl enable postgresql-9.3
systemctl start postgresql-9.3
# desde consola psql
su - postgres
psql postgres
alter user postgres encrypted password 'XXXXXXXXX';
create user bpm encrypted password 'XXXXXXXXX';
create database stpsig owner bpm;
# conectarse a db creada
\c stpsig
# http://postgis.net/install/
-- Enable PostGIS (includes raster)
CREATE EXTENSION postgis;
-- Enable Topology
CREATE EXTENSION postgis_topology;
-- fuzzy matching needed for Tiger
CREATE EXTENSION fuzzystrmatch;
-- Enable US Tiger Geocoder
CREATE EXTENSION postgis_tiger_geocoder;
-- Redefinir search_path
alter database stpsig set search_path to bpm, crm, mecip, tiger, tiger_data, topology, sig;
# Mapserver repo
yum install http://elgis.argeo.org/repos/6/elgis-release-6-6_0.noarch.rpm
# Repo para fonts
yum install http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
# Instalar mapserver
yum install mapserver.x86_64
# Dependencias http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS#Packages_matrix
yum install gdal.x86_64
yum install geos.x86_64
yum install proj-epsg.x86_64
# Editar /etc/httpd/conf/httpd.conf
# Buscar la seccion
<Directory "/var/www/cgi-bin">
AllowOverride None
Options FollowSymLinks
Require all granted
</Directory>
# Crear /etc/httpd/conf.d/maps.conf
Alias /stpms /usr/sbin/mapserv
<Location /stpms>
SetHandler cgi-script
Options +ExecCGI
SetEnv MS_MAPFILE /opt/stp.map
Require all granted
</Location>
# Editar /opt/stp.map
# Completar host, dbname, user y port en las lineas donde aparezca, dependiendo del sistema
CONNECTION "host=localhost dbname=stpsig user=bpm password=cybiraconsulting port=5433"
# Editar /opt/tomcat/webapps/bpmStp1/scripts/js/map.js
# Definir el nombre correcto de host, ACCESIBLE DESDE INTERNET
var MAPSERVER = "http://mapas.stp.gov.py/stpms";
# Editar en la segunda linea /bpmStp1/servlet/ por el valor adecuado
var REPORTEMAPA = location.protocol + "//" + location.host +
"/bpmStp1/servlet/WSNavigatorPlus?_APPNAME=bpm&" +
"_PAGE=mapa_coo.portal_proyecto_total"
# Editar en la segunda linea /bpmStp1/servlet/ por el valor adecuado
var PROYECTOSBPM = location.protocol + "//" + location.host +
"/bpmStp1/servlet/WSNavigatorPlus?_APPNAME=bpm&" +
"_PAGE=mapa_coo.portal_cooperacion_distrito&" +
"mapa_departamento={departamentoid}&mapa_distrito={distritoid}&" +
"_NEWSESSION=TRUE"
MAP
NAME "paraguay"
STATUS ON
SIZE 1366 768
EXTENT -6973566.913997 -3197610.123184 -6040075.780705 -2189061.472346
UNITS METERS
IMAGETYPE png
IMAGECOLOR -1 -1 -1
FONTSET "fonts"
SYMBOLSET "symbols"
WEB
METADATA
# WMS
"wms_title" "Paraguay"
"wms_onlineresource" "http://localhost/stpms?"
"wms_srs" "EPSG:3857 EPSG:4326 EPSG:32721"
"wms_enable_request" "*"
"wms_encoding" "UTF-8"
"wms_extent" "-6973566.913997 -3197610.123184 -6040075.780705 -2189061.472346"
"wms_feature_info_mime_type" "text/html"
# WFS
"wfs_title" "Paraguay"
"wfs_onlineresource" "http://localhost/stpms?"
"wfs_srs" "EPSG:3857 EPSG:4326 EPSG:32721"
"wfs_abstract" "WFS STP Server abstract"
"wfs_enable_request" "*"
"wfs_encoding" "UTF-8"
# OWS
"ows_keywordlist" "paraguay stp"
"ows_fees" "none"
"ows_accessconstraints" "none"
"ows_contactorganization" "STP"
"ows_service_onlineresource" "https://localhost/stpms?"
"ows_contactperson" ""
"ows_contactposition" ""
"ows_contactvoicetelephone" ""
"ows_contactfacsimiletelephone" ""
"ows_addresstype" ""
"ows_address" ""
"ows_city" "Asuncion"
"ows_stateorprovince" "Capital"
"ows_postcode" ""
"ows_country" "Paraguay"
"ows_contactelectronicmailaddress" "info@stp.gov.py"
"ows_hoursofservice" "0"
"ows_contactinstructions" ""
"ows_role" ""
END
END
PROJECTION
"init=epsg:3857"
END
OUTPUTFORMAT
NAME "png"
DRIVER AGG/PNG
MIMETYPE "image/png"
IMAGEMODE RGB
EXTENSION "png"
END
OUTPUTFORMAT
NAME "geojson"
DRIVER "OGR/GEOJSON"
MIMETYPE "application/json; subtype=geojson; charset=utf-8"
FORMATOPTION "STORAGE=stream"
FORMATOPTION "FORM=SIMPLE"
END
LAYER
NAME "departamentos"
EXTENT -6973566.913997 -3197610.123184 -6040075.780705 -2189061.472346
TYPE POLYGON
STATUS OFF
CONNECTIONTYPE POSTGIS
CONNECTION "host=pg02.stp.gov.py dbname=stp_crm user=bpm password=cybiraconsulting port=5432"
DATA "geom from sigdptoview using unique id"
METADATA
# WMS server
"wms_title" "WMS Departamentos"
"wms_srs" "EPSG:3857 EPSG:4326 EPSG:32721"
"wms_extent" "-6973566.913997 -3197610.123184 -6040075.780705 -2189061.472346"
"wms_feature_info_mime_type" "text/html"
"wms_encoding" "UTF-8"
# WFS server
"wfs_title" "WFS Departamentos"
"wfs_srs" "EPSG:3857 EPSG:4326 EPSG:32721"
"wfs_featureid" "id"
"wfs_getfeature_formatlist" "geojson"
"wfs_encoding" "UTF-8"
"ows_geomtype" "MultiPolygon"
"ows_featureid" "id"
"gml_featureid" "id"
"gml_include_items" "all"
END
PROJECTION
"init=epsg:3857"
END
CLASS
NAME "departamento"
STYLE
COLOR -1 -1 -1
OUTLINECOLOR 255 127 63
OPACITY 100
END
END
END
LAYER
NAME "dptoproyectos"
EXTENT -6973566.913997 -3197610.123184 -6040075.780705 -2189061.472346
TYPE POINT
STATUS OFF
CONNECTIONTYPE POSTGIS
CONNECTION "host=pg02.stp.gov.py dbname=stp_crm user=bpm password=cybiraconsulting port=5432"
DATA "geom from sigdptoproyectos using unique id"
METADATA
# WMS server
"wms_title" "WMS Proyectos Departamentos"
"wms_srs" "EPSG:3857 EPSG:4326 EPSG:32721"
"wms_extent" "-6973566.913997 -3197610.123184 -6040075.780705 -2189061.472346"
"wms_feature_info_mime_type" "text/html"
"wms_encoding" "UTF-8"
# WFS server
"wfs_title" "WFS Proyectos Departamentos"
"wfs_srs" "EPSG:3857 EPSG:4326 EPSG:32721"
"wfs_featureid" "id"
"wfs_getfeature_formatlist" "geojson"
"wfs_encoding" "UTF-8"
"ows_geomtype" "Point"
"ows_featureid" "id"
"gml_featureid" "id"
"gml_include_items" "all"
END
PROJECTION
"init=epsg:3857"
END
CLASS
NAME "dptoproyectos"
STYLE
COLOR -1 -1 -1
OUTLINECOLOR 255 127 63
OPACITY 100
END
END
END
LAYER
NAME "distritos"
EXTENT -6973566.914077 -3197610.123226 -6040075.780508 -2189061.472343
TYPE POLYGON
STATUS OFF
CONNECTIONTYPE POSTGIS
CONNECTION "host=pg02.stp.gov.py dbname=stp_crm user=bpm password=cybiraconsulting port=5432"
DATA "geom from sigdtoview using unique id"
METADATA
# WMS server
"wms_title" "WMS Distritos"
"wms_srs" "EPSG:3857 EPSG:4326 EPSG:32721"
"wms_extent" "-6973566.914077 -3197610.123226 -6040075.780508 -2189061.472343"
"wms_feature_info_mime_type" "text/html"
"wms_encoding" "UTF-8"
# WFS server
"wfs_title" "WFS Distritos"
"wfs_srs" "EPSG:3857 EPSG:4326 EPSG:32721"
"wfs_featureid" "id"
"wfs_getfeature_formatlist" "geojson"
"wfs_encoding" "UTF-8"
"ows_geomtype" "MultiPolygon"
"ows_featureid" "id"
"gml_featureid" "id"
"gml_include_items" "all"
END
PROJECTION
"init=epsg:3857"
END
CLASS
NAME "distrito"
STYLE
COLOR -1 -1 -1
OUTLINECOLOR 255 127 63
OPACITY 100
END
END
END
LAYER
NAME "dtoproyectos"
EXTENT -6973566.914077 -3197610.123226 -6040075.780508 -2189061.472343
TYPE POINT
STATUS OFF
CONNECTIONTYPE POSTGIS
CONNECTION "host=pg02.stp.gov.py dbname=stp_crm user=bpm password=cybiraconsulting port=5432"
DATA "geom from sigdtoproyectos using unique id"
METADATA
# WMS server
"wms_title" "WMS Proyectos Distritos"
"wms_srs" "EPSG:3857 EPSG:4326 EPSG:32721"
"wms_extent" "-6973566.914077 -3197610.123226 -6040075.780508 -2189061.472343"
"wms_feature_info_mime_type" "text/html"
"wms_encoding" "UTF-8"
# WFS server
"wfs_title" "WFS Proyectos Distritos"
"wfs_srs" "EPSG:3857 EPSG:4326 EPSG:32721"
"wfs_featureid" "id"
"wfs_getfeature_formatlist" "geojson"
"wfs_encoding" "UTF-8"
"ows_geomtype" "Point"
"ows_featureid" "id"
"gml_featureid" "id"
"gml_include_items" "all"
END
PROJECTION
"init=epsg:3857"
END
CLASS
NAME "dtoproyectos"
STYLE
COLOR -1 -1 -1
OUTLINECOLOR 255 127 63
OPACITY 100
END
END
END
END
SYMBOLSET
SYMBOL
NAME "circle"
TYPE ellipse
FILLED true
POINTS
1 1
END
END
END
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment