Commit 5e81628976ccbba318c8456fe1d04794dcd9f00c

Authored by Edmar Moretti
1 parent 10c47820
Exists in master

V5 - atualização do gerador de serviços OGC para permitir o download via shapefile

.buildpath 0 → 100755
@@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<buildpath>
  3 + <buildpathentry kind="src" path=""/>
  4 + <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
  5 +</buildpath>
.project 0 → 100755
@@ -0,0 +1,57 @@ @@ -0,0 +1,57 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<projectDescription>
  3 + <name>i3geo5</name>
  4 + <comment></comment>
  5 + <projects>
  6 + </projects>
  7 + <buildSpec>
  8 + <buildCommand>
  9 + <name>org.eclipse.wst.validation.validationbuilder</name>
  10 + <arguments>
  11 + </arguments>
  12 + </buildCommand>
  13 + <buildCommand>
  14 + <name>org.eclipse.dltk.core.scriptbuilder</name>
  15 + <arguments>
  16 + </arguments>
  17 + </buildCommand>
  18 + <buildCommand>
  19 + <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
  20 + <arguments>
  21 + </arguments>
  22 + </buildCommand>
  23 + </buildSpec>
  24 + <natures>
  25 + <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
  26 + <nature>org.eclipse.php.core.PHPNature</nature>
  27 + </natures>
  28 + <filteredResources>
  29 + <filter>
  30 + <id>1398253728703</id>
  31 + <name></name>
  32 + <type>14</type>
  33 + <matcher>
  34 + <id>org.eclipse.ui.ide.multiFilter</id>
  35 + <arguments>1.0-name-matches-false-false-compact*</arguments>
  36 + </matcher>
  37 + </filter>
  38 + <filter>
  39 + <id>1398253728704</id>
  40 + <name></name>
  41 + <type>14</type>
  42 + <matcher>
  43 + <id>org.eclipse.ui.ide.multiFilter</id>
  44 + <arguments>1.0-name-matches-false-false-pacotes</arguments>
  45 + </matcher>
  46 + </filter>
  47 + <filter>
  48 + <id>1398253728706</id>
  49 + <name></name>
  50 + <type>30</type>
  51 + <matcher>
  52 + <id>org.eclipse.ui.ide.multiFilter</id>
  53 + <arguments>1.0-name-matches-false-false-.*</arguments>
  54 + </matcher>
  55 + </filter>
  56 + </filteredResources>
  57 +</projectDescription>
.settings/.jsdtscope 0 → 100755
@@ -0,0 +1,205 @@ @@ -0,0 +1,205 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<classpath>
  3 + <classpathentry kind="src" path="admin/js"/>
  4 + <classpathentry excluding="compactados/" kind="src" path="classesjs"/>
  5 + <classpathentry kind="src" path="classesjs/compactados"/>
  6 + <classpathentry kind="src" path="documentacao/javascript"/>
  7 + <classpathentry kind="src" path="exemplos/atlas"/>
  8 + <classpathentry kind="src" path="ferramentas/3d"/>
  9 + <classpathentry kind="src" path="ferramentas/agrupaelementos"/>
  10 + <classpathentry kind="src" path="ferramentas/analisageometrias"/>
  11 + <classpathentry kind="src" path="ferramentas/animacao"/>
  12 + <classpathentry kind="src" path="ferramentas/aplicarsld"/>
  13 + <classpathentry kind="src" path="ferramentas/buffer"/>
  14 + <classpathentry kind="src" path="ferramentas/bufferpt"/>
  15 + <classpathentry kind="src" path="ferramentas/busca"/>
  16 + <classpathentry kind="src" path="ferramentas/buscafotos"/>
  17 + <classpathentry kind="src" path="ferramentas/buscainde"/>
  18 + <classpathentry kind="src" path="ferramentas/buscarapida"/>
  19 + <classpathentry kind="src" path="ferramentas/carouseltemas"/>
  20 + <classpathentry kind="src" path="ferramentas/carregakml"/>
  21 + <classpathentry kind="src" path="ferramentas/carregamapa"/>
  22 + <classpathentry kind="src" path="ferramentas/centroide"/>
  23 + <classpathentry kind="src" path="ferramentas/centromassa"/>
  24 + <classpathentry kind="src" path="ferramentas/colorpicker"/>
  25 + <classpathentry kind="src" path="ferramentas/colourramp"/>
  26 + <classpathentry kind="src" path="ferramentas/comentarios"/>
  27 + <classpathentry kind="src" path="ferramentas/conectargeojson"/>
  28 + <classpathentry kind="src" path="ferramentas/conectargeorss"/>
  29 + <classpathentry kind="src" path="ferramentas/conectarwms"/>
  30 + <classpathentry kind="src" path="ferramentas/confluence"/>
  31 + <classpathentry kind="src" path="ferramentas/convertekml"/>
  32 + <classpathentry kind="src" path="ferramentas/convertemapakml"/>
  33 + <classpathentry kind="src" path="ferramentas/convertews"/>
  34 + <classpathentry kind="src" path="ferramentas/cortina"/>
  35 + <classpathentry kind="src" path="ferramentas/dissolve"/>
  36 + <classpathentry kind="src" path="ferramentas/distanciaptpt"/>
  37 + <classpathentry kind="src" path="ferramentas/download"/>
  38 + <classpathentry kind="src" path="ferramentas/editorsql"/>
  39 + <classpathentry kind="src" path="ferramentas/especies"/>
  40 + <classpathentry kind="src" path="ferramentas/etiqueta"/>
  41 + <classpathentry kind="src" path="ferramentas/excluirarvore"/>
  42 + <classpathentry kind="src" path="ferramentas/filtro"/>
  43 + <classpathentry kind="src" path="ferramentas/filtroarvore"/>
  44 + <classpathentry kind="src" path="ferramentas/geonames"/>
  45 + <classpathentry kind="src" path="ferramentas/googlemaps"/>
  46 + <classpathentry kind="src" path="ferramentas/googlemaps1"/>
  47 + <classpathentry kind="src" path="ferramentas/gradecoord"/>
  48 + <classpathentry kind="src" path="ferramentas/gradehex"/>
  49 + <classpathentry kind="src" path="ferramentas/gradepol"/>
  50 + <classpathentry kind="src" path="ferramentas/gradepontos"/>
  51 + <classpathentry kind="src" path="ferramentas/graficointerativo"/>
  52 + <classpathentry kind="src" path="ferramentas/graficointerativo1"/>
  53 + <classpathentry kind="src" path="ferramentas/graficotema"/>
  54 + <classpathentry kind="src" path="ferramentas/identifica"/>
  55 + <classpathentry kind="src" path="ferramentas/importarwmc"/>
  56 + <classpathentry kind="src" path="ferramentas/imprimir"/>
  57 + <classpathentry kind="src" path="ferramentas/inseregrafico"/>
  58 + <classpathentry kind="src" path="ferramentas/inseretxt"/>
  59 + <classpathentry kind="src" path="ferramentas/inserexy2"/>
  60 + <classpathentry kind="src" path="ferramentas/legenda"/>
  61 + <classpathentry kind="src" path="ferramentas/linhadotempo"/>
  62 + <classpathentry kind="src" path="ferramentas/loginusuario"/>
  63 + <classpathentry excluding="templates/lib/" kind="src" path="ferramentas/metaestat"/>
  64 + <classpathentry kind="src" path="ferramentas/metaestat/templates/lib"/>
  65 + <classpathentry kind="src" path="ferramentas/metar"/>
  66 + <classpathentry kind="src" path="ferramentas/mostraexten"/>
  67 + <classpathentry kind="src" path="ferramentas/navegapostgis"/>
  68 + <classpathentry kind="src" path="ferramentas/navegarquivos"/>
  69 + <classpathentry kind="src" path="ferramentas/nptpol"/>
  70 + <classpathentry kind="src" path="ferramentas/nuvemtags"/>
  71 + <classpathentry kind="src" path="ferramentas/nuvemtagsflash"/>
  72 + <classpathentry kind="src" path="ferramentas/opacidademapa"/>
  73 + <classpathentry kind="src" path="ferramentas/opcoes_autoredesenha"/>
  74 + <classpathentry kind="src" path="ferramentas/opcoes_escala"/>
  75 + <classpathentry kind="src" path="ferramentas/opcoes_fundo"/>
  76 + <classpathentry kind="src" path="ferramentas/opcoes_label"/>
  77 + <classpathentry kind="src" path="ferramentas/opcoes_legenda"/>
  78 + <classpathentry kind="src" path="ferramentas/opcoes_quadros"/>
  79 + <classpathentry kind="src" path="ferramentas/opcoes_querymap"/>
  80 + <classpathentry kind="src" path="ferramentas/opcoes_tamanho"/>
  81 + <classpathentry kind="src" path="ferramentas/outputformat"/>
  82 + <classpathentry kind="src" path="ferramentas/perfil"/>
  83 + <classpathentry kind="src" path="ferramentas/pontoempoligono"/>
  84 + <classpathentry kind="src" path="ferramentas/pontosdistri"/>
  85 + <classpathentry kind="src" path="ferramentas/preferencias"/>
  86 + <classpathentry kind="src" path="ferramentas/redessociais"/>
  87 + <classpathentry excluding="saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/CCC_Chart/|saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/i3GeoMap/|saiku-server/tomcat/webapps/ROOT/js/saiku/|saiku-server/tomcat/webapps/ROOT/js/jquery/|saiku-server/tomcat/webapps/ROOT/js/saiku/views/" kind="src" path="ferramentas/saiku"/>
  88 + <classpathentry kind="src" path="ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/jquery"/>
  89 + <classpathentry excluding="plugins/CCC_Chart/|plugins/i3GeoMap/|views/" kind="src" path="ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku"/>
  90 + <classpathentry kind="src" path="ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/CCC_Chart"/>
  91 + <classpathentry kind="src" path="ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/plugins/i3GeoMap"/>
  92 + <classpathentry kind="src" path="ferramentas/saiku/saiku-server/tomcat/webapps/ROOT/js/saiku/views"/>
  93 + <classpathentry kind="src" path="ferramentas/salvamapa"/>
  94 + <classpathentry kind="src" path="ferramentas/salvamapfile"/>
  95 + <classpathentry kind="src" path="ferramentas/scielo"/>
  96 + <classpathentry kind="src" path="ferramentas/selecao"/>
  97 + <classpathentry kind="src" path="ferramentas/tabela"/>
  98 + <classpathentry kind="src" path="ferramentas/telaremota"/>
  99 + <classpathentry kind="src" path="ferramentas/tipoimagem"/>
  100 + <classpathentry kind="src" path="ferramentas/tme"/>
  101 + <classpathentry kind="src" path="ferramentas/toponimia"/>
  102 + <classpathentry kind="src" path="ferramentas/upload"/>
  103 + <classpathentry kind="src" path="ferramentas/uploaddbf"/>
  104 + <classpathentry kind="src" path="ferramentas/uploadgpx"/>
  105 + <classpathentry kind="src" path="ferramentas/uploadkml"/>
  106 + <classpathentry kind="src" path="ferramentas/uploadsimbolo"/>
  107 + <classpathentry kind="src" path="ferramentas/vinde"/>
  108 + <classpathentry kind="src" path="ferramentas/wiki"/>
  109 + <classpathentry kind="src" path="ferramentas/wmstime"/>
  110 + <classpathentry kind="src" path="init"/>
  111 + <classpathentry kind="src" path="mashups"/>
  112 + <classpathentry excluding="yui290/build/animation/|yui290/build/charts/|yui290/build/menu/|simile/timeline_2.3.0/timeline_ajax/|proj4js/lib/projCode/|yui290/build/storage/|yui290/build/profiler/|yui290/build/autocomplete/|balloon-tooltips/htdocs/js/|cswclient/lib/scripts/|ccc2/ccc/|simile/timeline_2.3.0/timeline_js/scripts/l10n/fr/|yui290/build/cookie/|mobileesp/|yui290/build/event-simulate/|simile/timeline_2.3.0/timeline_js/scripts/l10n/zh/|yui290/build/get/|yui290/build/paginator/|simile/timeline_2.3.0/timeline_js/scripts/l10n/vi/|balloon-tooltips/htdocs_depreciado/js/|proj4js/demo/|yui290/build/element-delegate/|openlayers/|yui290/build/progressbar/|wpcumulus/|richdraw/|eudock/js/|yui290/build/dom/|yui290/build/profilerviewer/|yui290/build/selector/|cpaint/|yui290/build/swf/|yui290/build/imagecropper/|openflashchart/|yui290/build/resize/|yui290/build/logger/|simile/timeline_local_example_1.0/local_example/|wicket/|simile/timeline_2.3.0/timeline_js/scripts/l10n/de/|yui290/build/imageloader/|proj4js/demo/maps/|yui290/build/dragdrop/|simile/timeline_2.3.0/timeline_js/scripts/l10n/en/|yui290/build/layout/|simile/timeline_2.3.0/timeline_ajax/scripts/|simile/timeline_2.3.0/timeline_js/scripts/l10n/nl/|yui290/build/yahoo/|yui290/assets/|yui290/build/datasource/|yui290/build/colorpicker/|yui290/build/event/|simile/timeline_2.3.0/timeline_js/scripts/l10n/ru/|yui290/build/datatable/|simile/timeline_2.3.0/timeline_js/scripts/l10n/es/|jsts/lib/|proj4js/lib/defs/|yui290/build/event-mouseenter/|yui290/build/treeview/|yui290/build/button/|simile/timeline_2.3.0/timeline_js/scripts/l10n/it/|yui290/build/yahoo-dom-event/|yui290/build/utilities/|simile/timeline_2.3.0/timeline_js/scripts/l10n/cs/|yui290/build/json/|proj4js/docs/NaturalDocs/javascript/|yui290/build/element/|yui290/build/slider/|cpaint/JSON/|yui290/build/connection/|yui290/build/swfdetect/|yui290/build/yuiloader/|simile/timeline_2.3.0/timeline_js/scripts/l10n/tr/|tme/javascript/|yui290/build/uploader/|yui290/build/carousel/|yui290/build/calendar/|yui290/build/yuitest/|yui290/build/container/|simile/timeline_2.3.0/timeline_js/scripts/l10n/se/|yui290/build/event-delegate/|simile/timeline_2.3.0/timeline_js/|yui290/build/history/|yui290/build/editor/|yui290/build/datemath/|yui290/build/tabview/|yui290/build/yuiloader-dom-event/|yui290/build/swfstore/|yui290/build/stylesheet/|google/|proj4js/lib/" kind="src" path="pacotes"/>
  113 + <classpathentry kind="src" path="pacotes/balloon-tooltips/htdocs_depreciado/js"/>
  114 + <classpathentry kind="src" path="pacotes/balloon-tooltips/htdocs/js"/>
  115 + <classpathentry kind="src" path="pacotes/ccc2/ccc"/>
  116 + <classpathentry excluding="JSON/" kind="src" path="pacotes/cpaint"/>
  117 + <classpathentry kind="src" path="pacotes/cpaint/JSON"/>
  118 + <classpathentry kind="src" path="pacotes/cswclient/lib/scripts"/>
  119 + <classpathentry kind="src" path="pacotes/eudock/js"/>
  120 + <classpathentry kind="src" path="pacotes/google"/>
  121 + <classpathentry kind="src" path="pacotes/jsts/lib"/>
  122 + <classpathentry kind="src" path="pacotes/mobileesp"/>
  123 + <classpathentry kind="src" path="pacotes/openflashchart"/>
  124 + <classpathentry kind="src" path="pacotes/openlayers"/>
  125 + <classpathentry excluding="maps/" kind="src" path="pacotes/proj4js/demo"/>
  126 + <classpathentry kind="src" path="pacotes/proj4js/demo/maps"/>
  127 + <classpathentry kind="src" path="pacotes/proj4js/docs/NaturalDocs/javascript"/>
  128 + <classpathentry excluding="projCode/|defs/" kind="src" path="pacotes/proj4js/lib"/>
  129 + <classpathentry kind="src" path="pacotes/proj4js/lib/defs"/>
  130 + <classpathentry kind="src" path="pacotes/proj4js/lib/projCode"/>
  131 + <classpathentry kind="src" path="pacotes/richdraw"/>
  132 + <classpathentry excluding="scripts/" kind="src" path="pacotes/simile/timeline_2.3.0/timeline_ajax"/>
  133 + <classpathentry kind="src" path="pacotes/simile/timeline_2.3.0/timeline_ajax/scripts"/>
  134 + <classpathentry excluding="scripts/l10n/fr/|scripts/l10n/zh/|scripts/l10n/vi/|scripts/l10n/de/|scripts/l10n/en/|scripts/l10n/nl/|scripts/l10n/ru/|scripts/l10n/es/|scripts/l10n/it/|scripts/l10n/cs/|scripts/l10n/tr/|scripts/l10n/se/" kind="src" path="pacotes/simile/timeline_2.3.0/timeline_js"/>
  135 + <classpathentry kind="src" path="pacotes/simile/timeline_2.3.0/timeline_js/scripts/l10n/cs"/>
  136 + <classpathentry kind="src" path="pacotes/simile/timeline_2.3.0/timeline_js/scripts/l10n/de"/>
  137 + <classpathentry kind="src" path="pacotes/simile/timeline_2.3.0/timeline_js/scripts/l10n/en"/>
  138 + <classpathentry kind="src" path="pacotes/simile/timeline_2.3.0/timeline_js/scripts/l10n/es"/>
  139 + <classpathentry kind="src" path="pacotes/simile/timeline_2.3.0/timeline_js/scripts/l10n/fr"/>
  140 + <classpathentry kind="src" path="pacotes/simile/timeline_2.3.0/timeline_js/scripts/l10n/it"/>
  141 + <classpathentry kind="src" path="pacotes/simile/timeline_2.3.0/timeline_js/scripts/l10n/nl"/>
  142 + <classpathentry kind="src" path="pacotes/simile/timeline_2.3.0/timeline_js/scripts/l10n/ru"/>
  143 + <classpathentry kind="src" path="pacotes/simile/timeline_2.3.0/timeline_js/scripts/l10n/se"/>
  144 + <classpathentry kind="src" path="pacotes/simile/timeline_2.3.0/timeline_js/scripts/l10n/tr"/>
  145 + <classpathentry kind="src" path="pacotes/simile/timeline_2.3.0/timeline_js/scripts/l10n/vi"/>
  146 + <classpathentry kind="src" path="pacotes/simile/timeline_2.3.0/timeline_js/scripts/l10n/zh"/>
  147 + <classpathentry kind="src" path="pacotes/simile/timeline_local_example_1.0/local_example"/>
  148 + <classpathentry kind="src" path="pacotes/tme/javascript"/>
  149 + <classpathentry kind="src" path="pacotes/wicket"/>
  150 + <classpathentry kind="src" path="pacotes/wpcumulus"/>
  151 + <classpathentry kind="src" path="pacotes/yui290/assets"/>
  152 + <classpathentry kind="src" path="pacotes/yui290/build/animation"/>
  153 + <classpathentry kind="src" path="pacotes/yui290/build/autocomplete"/>
  154 + <classpathentry kind="src" path="pacotes/yui290/build/button"/>
  155 + <classpathentry kind="src" path="pacotes/yui290/build/calendar"/>
  156 + <classpathentry kind="src" path="pacotes/yui290/build/carousel"/>
  157 + <classpathentry kind="src" path="pacotes/yui290/build/charts"/>
  158 + <classpathentry kind="src" path="pacotes/yui290/build/colorpicker"/>
  159 + <classpathentry kind="src" path="pacotes/yui290/build/connection"/>
  160 + <classpathentry kind="src" path="pacotes/yui290/build/container"/>
  161 + <classpathentry kind="src" path="pacotes/yui290/build/cookie"/>
  162 + <classpathentry kind="src" path="pacotes/yui290/build/datasource"/>
  163 + <classpathentry kind="src" path="pacotes/yui290/build/datatable"/>
  164 + <classpathentry kind="src" path="pacotes/yui290/build/datemath"/>
  165 + <classpathentry kind="src" path="pacotes/yui290/build/dom"/>
  166 + <classpathentry kind="src" path="pacotes/yui290/build/dragdrop"/>
  167 + <classpathentry kind="src" path="pacotes/yui290/build/editor"/>
  168 + <classpathentry kind="src" path="pacotes/yui290/build/element"/>
  169 + <classpathentry kind="src" path="pacotes/yui290/build/element-delegate"/>
  170 + <classpathentry kind="src" path="pacotes/yui290/build/event"/>
  171 + <classpathentry kind="src" path="pacotes/yui290/build/event-delegate"/>
  172 + <classpathentry kind="src" path="pacotes/yui290/build/event-mouseenter"/>
  173 + <classpathentry kind="src" path="pacotes/yui290/build/event-simulate"/>
  174 + <classpathentry kind="src" path="pacotes/yui290/build/get"/>
  175 + <classpathentry kind="src" path="pacotes/yui290/build/history"/>
  176 + <classpathentry kind="src" path="pacotes/yui290/build/imagecropper"/>
  177 + <classpathentry kind="src" path="pacotes/yui290/build/imageloader"/>
  178 + <classpathentry kind="src" path="pacotes/yui290/build/json"/>
  179 + <classpathentry kind="src" path="pacotes/yui290/build/layout"/>
  180 + <classpathentry kind="src" path="pacotes/yui290/build/logger"/>
  181 + <classpathentry kind="src" path="pacotes/yui290/build/menu"/>
  182 + <classpathentry kind="src" path="pacotes/yui290/build/paginator"/>
  183 + <classpathentry kind="src" path="pacotes/yui290/build/profiler"/>
  184 + <classpathentry kind="src" path="pacotes/yui290/build/profilerviewer"/>
  185 + <classpathentry kind="src" path="pacotes/yui290/build/progressbar"/>
  186 + <classpathentry kind="src" path="pacotes/yui290/build/resize"/>
  187 + <classpathentry kind="src" path="pacotes/yui290/build/selector"/>
  188 + <classpathentry kind="src" path="pacotes/yui290/build/slider"/>
  189 + <classpathentry kind="src" path="pacotes/yui290/build/storage"/>
  190 + <classpathentry kind="src" path="pacotes/yui290/build/stylesheet"/>
  191 + <classpathentry kind="src" path="pacotes/yui290/build/swf"/>
  192 + <classpathentry kind="src" path="pacotes/yui290/build/swfdetect"/>
  193 + <classpathentry kind="src" path="pacotes/yui290/build/swfstore"/>
  194 + <classpathentry kind="src" path="pacotes/yui290/build/tabview"/>
  195 + <classpathentry kind="src" path="pacotes/yui290/build/treeview"/>
  196 + <classpathentry kind="src" path="pacotes/yui290/build/uploader"/>
  197 + <classpathentry kind="src" path="pacotes/yui290/build/utilities"/>
  198 + <classpathentry kind="src" path="pacotes/yui290/build/yahoo"/>
  199 + <classpathentry kind="src" path="pacotes/yui290/build/yahoo-dom-event"/>
  200 + <classpathentry kind="src" path="pacotes/yui290/build/yuiloader"/>
  201 + <classpathentry kind="src" path="pacotes/yui290/build/yuiloader-dom-event"/>
  202 + <classpathentry kind="src" path="pacotes/yui290/build/yuitest"/>
  203 + <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
  204 + <classpathentry kind="output" path=""/>
  205 +</classpath>
.settings/org.eclipse.core.resources.prefs 0 → 100755
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
  1 +eclipse.preferences.version=1
  2 +encoding/<project>=ISO-8859-1
.settings/org.eclipse.wst.jsdt.ui.superType.container 0 → 100755
@@ -0,0 +1 @@ @@ -0,0 +1 @@
  1 +org.eclipse.wst.jsdt.launching.JRE_CONTAINER
0 \ No newline at end of file 2 \ No newline at end of file
.settings/org.eclipse.wst.jsdt.ui.superType.name 0 → 100755
@@ -0,0 +1 @@ @@ -0,0 +1 @@
  1 +Global
0 \ No newline at end of file 2 \ No newline at end of file
admin/admin.db
No preview for this file type
1 -<?php 1 +<?php
2 /* 2 /*
3 Title: Gerador de servi&ccedil;os OGC 3 Title: Gerador de servi&ccedil;os OGC
4 4
@@ -22,7 +22,7 @@ Este programa &amp;eacute; distribu&amp;iacute;do na expectativa de que seja &amp;uacute;til @@ -22,7 +22,7 @@ Este programa &amp;eacute; distribu&amp;iacute;do na expectativa de que seja &amp;uacute;til
22 por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita 22 por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
23 de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA. 23 de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
24 Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes. 24 Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
25 -Voc&ecirc; deve ter recebido uma cópia da Licen&ccedil;a P&uacute;blica Geral do 25 +Voc&ecirc; deve ter recebido uma copia da Licen&ccedil;a P&uacute;blica Geral do
26 GNU junto com este programa; se n&atilde;o, escreva para a 26 GNU junto com este programa; se n&atilde;o, escreva para a
27 Free Software Foundation, Inc., no endere&ccedil;o 27 Free Software Foundation, Inc., no endere&ccedil;o
28 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 28 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
@@ -44,20 +44,30 @@ legenda - (opcional) mostra a legenda no corpo do mapa sim|nao @@ -44,20 +44,30 @@ legenda - (opcional) mostra a legenda no corpo do mapa sim|nao
44 44
45 perfil - (opcional) perfil utilizado para restringir os temas que ser&atilde;o mostrados 45 perfil - (opcional) perfil utilizado para restringir os temas que ser&atilde;o mostrados
46 46
47 -format - (opcional) pode ser utilizado a op&ccedil;&atilde;o &format=application/openlayers para  
48 - abrir o mashup do OpenLayers com as camadas definida em temas. 47 +format - (opcional) pode ser utilizado a op&ccedil;&atilde;o &format=application/openlayers para
  48 + abrir o mashup do OpenLayers com as camadas definida em temas.
49 Na gera&ccedil;&atilde;o da legenda pode ser utilizado text/html para gerar no formato html. 49 Na gera&ccedil;&atilde;o da legenda pode ser utilizado text/html para gerar no formato html.
50 - 50 +
  51 +OUTPUTFORMAT - em getfeature, aceita tamb&eacute;m shape-zip para download de shapefile e csv para download de csv compactado
  52 +
51 id_medida_variavel - id da medida de variavel - utilizado apenas quando a fonte para definicao do layer for o sistema de metadados estatisticos 53 id_medida_variavel - id da medida de variavel - utilizado apenas quando a fonte para definicao do layer for o sistema de metadados estatisticos
52 - nao deve ser utilizado junto com tema  
53 - 54 + nao deve ser utilizado junto com tema
  55 +
54 restauramapa - ID de um mapa salvo no sistema de administracao. O mapa e restaurado e tratado como WMS 56 restauramapa - ID de um mapa salvo no sistema de administracao. O mapa e restaurado e tratado como WMS
55 -  
56 -DESLIGACACHE (opcional) {sim|nao} - forca a nao usar o cache de imagens qd definido como "sim", do contr&aacute;rio, o uso ou n&atilde;o do cache ser&aacute; definido automaticamente 57 +
  58 +DESLIGACACHE (opcional) {sim|nao} - forca a nao usar o cache de imagens qd definido como "sim", do contr&aacute;rio, o uso ou n&atilde;o do cache ser&aacute; definido automaticamente
  59 +
  60 +filtros - filtros podem ser adicionados incluindo o parametro da seguinte forma: &map_layer_<nomedotema>_filter=
  61 +
  62 + Exemplo de filtro
  63 +
  64 + http://localhost/i3geo/ogc.php?map_layer__lbiomashp_filter=(('[CD_LEGENDA]'='CAATINGA'))&tema=_lbiomashp&SRS=EPSG:4618&WIDTH=500&HEIGHT=500&BBOX=-76.5125927,-39.3925675209,-29.5851853,9.49014852081&FORMAT=image/png&service=wms&version=1.1.0&request=getmap&layers=_lbiomashp
  65 +
  66 + no caso de camadas Postgis basta usar map_layer__lbiomashp_filter=cd_legenda='CAATINGA'
57 67
58 Exemplos: 68 Exemplos:
59 -  
60 -ogc.php?temas=biomashp&format=application/openlayers&bbox=-54,-14,-50,-10 69 +
  70 +ogc.php?temas=biomashp&format=application/openlayers&bbox=-54,-14,-50,-10
61 71
62 ogc.php?lista=temas 72 ogc.php?lista=temas
63 73
@@ -69,21 +79,21 @@ ogc.php?intervalo=0,50 @@ -69,21 +79,21 @@ ogc.php?intervalo=0,50
69 */ 79 */
70 // 80 //
71 //valida&ccedil;&otilde;es e includes 81 //valida&ccedil;&otilde;es e includes
72 -// 82 +//
73 $cache = true; 83 $cache = true;
74 require_once(dirname(__FILE__)."/classesphp/carrega_ext.php"); 84 require_once(dirname(__FILE__)."/classesphp/carrega_ext.php");
75 include(dirname(__FILE__)."/ms_configura.php"); 85 include(dirname(__FILE__)."/ms_configura.php");
76 -include(dirname(__FILE__)."/classesphp/pega_variaveis.php");  
77 -include(dirname(__FILE__)."/classesphp/funcoes_gerais.php"); 86 +include(dirname(__FILE__)."/classesphp/pega_variaveis.php");
  87 +include(dirname(__FILE__)."/classesphp/funcoes_gerais.php");
78 //define um nome para o mapfile caso a origem seja o sistema de metadados estatisticos 88 //define um nome para o mapfile caso a origem seja o sistema de metadados estatisticos
79 if(isset($id_medida_variavel)){ 89 if(isset($id_medida_variavel)){
80 - $tema = "ogcmetaestat".$id_medida_variavel;  
81 - $_GET["layers"] = $tema; 90 + $tema = "ogcmetaestat".$id_medida_variavel;
  91 + $_GET["layers"] = $tema;
82 $_GET["LAYERS"] = $tema; 92 $_GET["LAYERS"] = $tema;
83 } 93 }
84 -if(!isset($temas) && isset($tema)){  
85 - $temas = $tema;  
86 -} 94 +if(!isset($temas) && isset($tema)){
  95 + $temas = $tema;
  96 +}
87 // 97 //
88 //recupera um mapa salvo no banco de administracao 98 //recupera um mapa salvo no banco de administracao
89 // 99 //
@@ -102,29 +112,29 @@ if(!empty($restauramapa)){ @@ -102,29 +112,29 @@ if(!empty($restauramapa)){
102 if($l != ""){ 112 if($l != ""){
103 $l->set("status",MS_DELETE); 113 $l->set("status",MS_DELETE);
104 } 114 }
105 - $m->save($xbase); 115 + $m->save($xbase);
106 //$fundo = $xbase; 116 //$fundo = $xbase;
107 - $temas = $xbase;  
108 - $_GET["tema"] = $temas;  
109 - $_GET["layers"] = "";  
110 - $l = $m->getlayer(0); 117 + $temas = $xbase;
  118 + $_GET["tema"] = $temas;
  119 + $_GET["layers"] = "";
  120 + $l = $m->getlayer(0);
111 $_GET["LAYERS"] = $l->name; 121 $_GET["LAYERS"] = $l->name;
112 -} 122 +}
113 // 123 //
114 //para operar como o Geoserver 124 //para operar como o Geoserver
115 // 125 //
116 if(isset($format) && strtolower($format) == "application/openlayers"){ 126 if(isset($format) && strtolower($format) == "application/openlayers"){
117 - //var_dump($_SERVER);exit;  
118 - if(!isset($layers)){  
119 - $layers = $temas; 127 + //var_dump($_SERVER);exit;
  128 + if(!isset($layers)){
  129 + $layers = $temas;
120 } 130 }
121 $urln = dirname($_SERVER["PHP_SELF"])."/mashups/openlayers.php?temas=".$layers."&layers=".$layers."&mapext=".$bbox."&botoes=pan,zoombox,zoomtot,identifica"; 131 $urln = dirname($_SERVER["PHP_SELF"])."/mashups/openlayers.php?temas=".$layers."&layers=".$layers."&mapext=".$bbox."&botoes=pan,zoombox,zoomtot,identifica";
122 - //echo $urln;exit;  
123 - if(!headers_sent()){  
124 - header("Location:".$urln); 132 + //echo $urln;exit;
  133 + if(!headers_sent()){
  134 + header("Location:".$urln);
125 } 135 }
126 - else{  
127 - echo "<meta http-equiv='refresh' content='0;url=$urln'>"; 136 + else{
  137 + echo "<meta http-equiv='refresh' content='0;url=$urln'>";
128 } 138 }
129 } 139 }
130 // 140 //
@@ -162,14 +172,17 @@ if(isset($lista) &amp;&amp; $lista == &quot;temaswfs&quot;){ @@ -162,14 +172,17 @@ if(isset($lista) &amp;&amp; $lista == &quot;temaswfs&quot;){
162 error_reporting(0); 172 error_reporting(0);
163 $versao = versao(); 173 $versao = versao();
164 $versao = $versao["principal"]; 174 $versao = $versao["principal"];
165 -$req = ms_newowsrequestobj(); 175 +if($_GET["SRS"] == "EPSG:900913"){
  176 + $_GET["SRS"] = "EPSG:3857";
  177 +}
  178 +$req = ms_newowsrequestobj();
166 $tipo = ""; 179 $tipo = "";
167 $_GET = array_merge($_GET,$_POST); 180 $_GET = array_merge($_GET,$_POST);
168 if(isset($_GET["sld"]) || isset($_GET["filter"])){ 181 if(isset($_GET["sld"]) || isset($_GET["filter"])){
169 $cache = false; 182 $cache = false;
170 -}  
171 -if(!isset($_GET["srs"]) && !isset($_GET["SRS"])){  
172 - $_GET["srs"] = "EPSG:4326"; 183 +}
  184 +if(!isset($_GET["srs"]) && !isset($_GET["SRS"])){
  185 + $_GET["srs"] = "EPSG:4326";
173 } 186 }
174 foreach ($_GET as $k=>$v){ 187 foreach ($_GET as $k=>$v){
175 $req->setParameter(strtoupper($k), $v); 188 $req->setParameter(strtoupper($k), $v);
@@ -177,16 +190,16 @@ foreach ($_GET as $k=&gt;$v){ @@ -177,16 +190,16 @@ foreach ($_GET as $k=&gt;$v){
177 $tipo = "metadados"; 190 $tipo = "metadados";
178 $cache = false; 191 $cache = false;
179 } 192 }
180 - if(strtolower($k) == "layers" && empty($_GET["tema"])){  
181 - $tema = $v; 193 + if(strtolower($k) == "layers" && empty($_GET["tema"])){
  194 + $tema = $v;
182 } 195 }
183 - if(strtolower($k) == "layer" && empty($_GET["tema"])){  
184 - $tema = $v; 196 + if(strtolower($k) == "layer" && empty($_GET["tema"])){
  197 + $tema = $v;
185 } 198 }
186 -}  
187 -$req->setParameter("srsName",$req->getValueByName("SRS")); 199 +}
  200 +$req->setParameter("srsName",$req->getValueByName("SRS"));
188 $listaepsg = $req->getValueByName("SRS")." EPSG:4618 EPSG:4291 EPSG:4326 EPSG:22521 EPSG:22522 EPSG:22523 EPSG:22524 EPSG:22525 EPSG:29101 EPSG:29119 EPSG:29120 EPSG:29121 EPSG:29122 EPSG:29177 EPSG:29178 EPSG:29179 EPSG:29180 EPSG:29181 EPSG:29182 EPSG:29183 EPSG:29184 EPSG:29185"; 201 $listaepsg = $req->getValueByName("SRS")." EPSG:4618 EPSG:4291 EPSG:4326 EPSG:22521 EPSG:22522 EPSG:22523 EPSG:22524 EPSG:22525 EPSG:29101 EPSG:29119 EPSG:29120 EPSG:29121 EPSG:29122 EPSG:29177 EPSG:29178 EPSG:29179 EPSG:29180 EPSG:29181 EPSG:29182 EPSG:29183 EPSG:29184 EPSG:29185";
189 -//echo $listaepsg;exit; 202 +//echo $listaepsg;exit;
190 if(count($_GET) == 0){ 203 if(count($_GET) == 0){
191 $tipo="intervalo"; 204 $tipo="intervalo";
192 $req->setParameter("REQUEST", "getCapabilities"); 205 $req->setParameter("REQUEST", "getCapabilities");
@@ -195,13 +208,13 @@ if(count($_GET) == 0){ @@ -195,13 +208,13 @@ if(count($_GET) == 0){
195 } 208 }
196 if(isset($tema) && $tipo != "metadados"){ 209 if(isset($tema) && $tipo != "metadados"){
197 $tipo = ""; 210 $tipo = "";
198 -}  
199 -if(isset($version) && !isset($VERSION)){  
200 - $VERSION = $version; 211 +}
  212 +if(isset($version) && !isset($VERSION)){
  213 + $VERSION = $version;
201 } 214 }
202 if(!isset($VERSION)){ 215 if(!isset($VERSION)){
203 - $req->setParameter("VeRsIoN","1.0.0");  
204 -} 216 + $req->setParameter("VeRsIoN","1.0.0");
  217 +}
205 if (!isset($intervalo)){ 218 if (!isset($intervalo)){
206 $intervalo = "0,5000"; 219 $intervalo = "0,5000";
207 } 220 }
@@ -213,33 +226,42 @@ if(!isset($tema)){ @@ -213,33 +226,42 @@ if(!isset($tema)){
213 $intervalo = "0,5000"; 226 $intervalo = "0,5000";
214 } 227 }
215 $tipo = "intervalo"; 228 $tipo = "intervalo";
216 -}  
217 -//nome do mapfile que ficara em cache  
218 -$agora = intval(time() / 1000);  
219 -//acrescenta ao nome a indicacao do tipo de TMS 229 +}
  230 +//nome do mapfile que ficara em cache
  231 +$agora = intval(time() / 1000);
  232 +//acrescenta ao nome a indicacao do tipo de TMS
220 if(isset($_GET["tms"])){ 233 if(isset($_GET["tms"])){
221 $agora .= "tms"; 234 $agora .= "tms";
222 -}  
223 -if(isset($_GET["Z"]) && isset($_GET["X"])){  
224 - $agora .= "google";  
225 -}  
226 -if(isset($_GET["DESLIGACACHE"]) && $_GET["DESLIGACACHE"] == "sim"){  
227 - $agora = time();  
228 - $cache = false;  
229 -}  
230 -$nomeMapfileTmp = $dir_tmp."/ogc_".md5($tema)."_".$agora.".map";  
231 -$nomeMapfileTmp = str_replace(",","",$nomeMapfileTmp);  
232 -$nomeMapfileTmp = str_replace(" ","",$nomeMapfileTmp);  
233 -if(file_exists($nomeMapfileTmp) && $tipo == ""){  
234 - $oMap = ms_newMapobj($nomeMapfileTmp);  
235 -}  
236 -else{ 235 +}
  236 +if(isset($_GET["Z"]) && isset($_GET["X"])){
  237 + $agora .= "google";
  238 +}
  239 +//
  240 +//se o outputformat for definido, evita o cahce de arquivo
  241 +//o mesmo se existir filtro para o layer
  242 +//
  243 +if(isset($_GET["OUTPUTFORMAT"]) || !empty($_GET["map_layer_".$tema."_filter"])){
  244 + $_GET["DESLIGACACHE"] = "sim";
  245 +}
  246 +if(isset($_GET["DESLIGACACHE"]) && $_GET["DESLIGACACHE"] == "sim"){
  247 + $agora = time();
  248 + $cache = false;
  249 +}
  250 +$nomeMapfileTmp = $dir_tmp."/ogc_".md5($tema)."_".$agora.".map";
  251 +$nomeMapfileTmp = str_replace(",","",$nomeMapfileTmp);
  252 +$nomeMapfileTmp = str_replace(" ","",$nomeMapfileTmp);
  253 +//essa variavel e usada para definir se a imagem final gerada devera ser cortada ou nao
  254 +$cortePixels = 0;
  255 +if(file_exists($nomeMapfileTmp) && $tipo == ""){
  256 + $oMap = ms_newMapobj($nomeMapfileTmp);
  257 +}
  258 +else{
237 if(empty($ogcwsmap)){ 259 if(empty($ogcwsmap)){
238 $oMap = ms_newMapobj($locaplic."/aplicmap/ogcwsv".$versao.".map"); 260 $oMap = ms_newMapobj($locaplic."/aplicmap/ogcwsv".$versao.".map");
239 } 261 }
240 else{ 262 else{
241 $oMap = ms_newMapobj($ogcwsmap); 263 $oMap = ms_newMapobj($ogcwsmap);
242 - } 264 + }
243 $proto = "http" . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "s" : "") . "://"; 265 $proto = "http" . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "s" : "") . "://";
244 $server = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']; 266 $server = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
245 $or = $proto.$server.$_SERVER['PHP_SELF']; 267 $or = $proto.$server.$_SERVER['PHP_SELF'];
@@ -262,21 +284,20 @@ else{ @@ -262,21 +284,20 @@ else{
262 $oMap->setmetadata("ows_enable_request","*"); 284 $oMap->setmetadata("ows_enable_request","*");
263 $e = $oMap->extent; 285 $e = $oMap->extent;
264 $extensaoMap = ($e->minx)." ".($e->miny)." ".($e->maxx)." ".($e->maxy); 286 $extensaoMap = ($e->minx)." ".($e->miny)." ".($e->maxx)." ".($e->maxy);
265 -  
266 //gera o mapa 287 //gera o mapa
267 - if ($tipo == "" || $tipo == "metadados"){ 288 + if ($tipo == "" || $tipo == "metadados"){
268 $tema = explode(" ",$tema); 289 $tema = explode(" ",$tema);
269 //para o caso do tema ser um arquivo mapfile existente em uma pasta qualquer 290 //para o caso do tema ser um arquivo mapfile existente em uma pasta qualquer
270 //$temai3geo = true indica que o layer ser&aacute; buscado na pasta i3geo/temas 291 //$temai3geo = true indica que o layer ser&aacute; buscado na pasta i3geo/temas
271 $temai3geo = true; 292 $temai3geo = true;
272 - //FIXME não aceita gvp quando o caminho é completo 293 + //FIXME nao aceita gvp quando o caminho e completo
273 if(file_exists($_GET["tema"]) && !isset($id_medida_variavel)){ 294 if(file_exists($_GET["tema"]) && !isset($id_medida_variavel)){
274 $nmap = ms_newMapobj($_GET["tema"]); 295 $nmap = ms_newMapobj($_GET["tema"]);
275 $temai3geo = false; 296 $temai3geo = false;
276 $nmap->setmetadata("ows_enable_request","*"); 297 $nmap->setmetadata("ows_enable_request","*");
277 } 298 }
278 foreach ($tema as $tx){ 299 foreach ($tema as $tx){
279 - $extensao = ".map"; 300 + $extensao = ".map";
280 if($temai3geo == true && file_exists($locaplic."/temas/".$tx.".php")){ 301 if($temai3geo == true && file_exists($locaplic."/temas/".$tx.".php")){
281 $extensao = ".php"; 302 $extensao = ".php";
282 } 303 }
@@ -285,16 +306,15 @@ else{ @@ -285,16 +306,15 @@ else{
285 } 306 }
286 if($extensao == ".map"){ 307 if($extensao == ".map"){
287 //cria o mapfile com base no sistema de metadados estatisticos 308 //cria o mapfile com base no sistema de metadados estatisticos
288 - //verifica se o id_medida_variavel existe no mapfile e nao foi passado como um parametro  
289 - if(!isset($id_medida_variavel) && $temai3geo == true){  
290 - $nmap = ms_newMapobj($locaplic."/temas/".$tx.".map");  
291 - $l = $nmap->getlayer(0);  
292 - $teste = $l->getmetadata("METAESTAT_ID_MEDIDA_VARIAVEL");  
293 - if($teste != "" && $l->data == ""){  
294 - $id_medida_variavel = $teste;  
295 - }  
296 -  
297 - } 309 + //verifica se o id_medida_variavel existe no mapfile e nao foi passado como um parametro
  310 + if(!isset($id_medida_variavel) && $temai3geo == true){
  311 + $nmap = ms_newMapobj($locaplic."/temas/".$tx.".map");
  312 + $l = $nmap->getlayer(0);
  313 + $teste = $l->getmetadata("METAESTAT_ID_MEDIDA_VARIAVEL");
  314 + if($teste != "" && $l->data == ""){
  315 + $id_medida_variavel = $teste;
  316 + }
  317 + }
298 if(isset($id_medida_variavel)){ 318 if(isset($id_medida_variavel)){
299 $temai3geo = false; 319 $temai3geo = false;
300 include("admin/php/classe_metaestat.php"); 320 include("admin/php/classe_metaestat.php");
@@ -304,31 +324,31 @@ else{ @@ -304,31 +324,31 @@ else{
304 $nmap = ms_newMapobj($mapfileMetaestat["mapfile"]); 324 $nmap = ms_newMapobj($mapfileMetaestat["mapfile"]);
305 $nmap->setmetadata("ows_enable_request","*"); 325 $nmap->setmetadata("ows_enable_request","*");
306 $req->setParameter("LAYERS", "ogcmetaestat".$id_medida_variavel); 326 $req->setParameter("LAYERS", "ogcmetaestat".$id_medida_variavel);
307 - } 327 + }
308 if($temai3geo == true){ 328 if($temai3geo == true){
309 $nmap = ms_newMapobj($locaplic."/temas/".$tx.".map"); 329 $nmap = ms_newMapobj($locaplic."/temas/".$tx.".map");
310 $nmap->setmetadata("ows_enable_request","*"); 330 $nmap->setmetadata("ows_enable_request","*");
311 } 331 }
312 if($temai3geo == false || empty($layers)) 332 if($temai3geo == false || empty($layers))
313 - {  
314 - $ts = $nmap->getalllayernames();  
315 - $nmap->setmetadata("ows_enable_request","*"); 333 + {
  334 + $ts = $nmap->getalllayernames();
  335 + $nmap->setmetadata("ows_enable_request","*");
316 } 336 }
317 else{ 337 else{
318 $ts = explode(",",str_replace(" ",",",$layers)); 338 $ts = explode(",",str_replace(" ",",",$layers));
319 } 339 }
320 - foreach ($ts as $t){ 340 + foreach ($ts as $t){
321 $l = $nmap->getlayerbyname($t); 341 $l = $nmap->getlayerbyname($t);
322 - $permite = $l->getmetadata("permiteogc"); 342 + $permite = $l->getmetadata("permiteogc");
323 if(strtolower($permite) != "nao"){ 343 if(strtolower($permite) != "nao"){
324 //necess&aacute;rio pq o mapfile pode ter todos os layers como default 344 //necess&aacute;rio pq o mapfile pode ter todos os layers como default
325 if($temai3geo == false){ 345 if($temai3geo == false){
326 $l->set("status",MS_OFF); 346 $l->set("status",MS_OFF);
327 - } 347 + }
328 /* 348 /*
329 if($cache == true && strtolower($l->getmetadata('cache')) == 'sim' && $tipo == '' && count($tema) == 1){ 349 if($cache == true && strtolower($l->getmetadata('cache')) == 'sim' && $tipo == '' && count($tema) == 1){
330 carregaCacheImagem($_GET['BBOX'],$tx,$_GET['WIDTH'],$_GET['HEIGHT'],$cachedir); 350 carregaCacheImagem($_GET['BBOX'],$tx,$_GET['WIDTH'],$_GET['HEIGHT'],$cachedir);
331 - } 351 + }
332 */ 352 */
333 $l->setmetadata("ows_title",pegaNome($l)); 353 $l->setmetadata("ows_title",pegaNome($l));
334 $l->setmetadata("ows_srs",$listaepsg); 354 $l->setmetadata("ows_srs",$listaepsg);
@@ -351,9 +371,8 @@ else{ @@ -351,9 +371,8 @@ else{
351 } 371 }
352 if($l->type == MS_LAYER_RASTER && $l->numclasses > 0){ 372 if($l->type == MS_LAYER_RASTER && $l->numclasses > 0){
353 $c = $l->getclass(0); 373 $c = $l->getclass(0);
354 - if($c->name == "")  
355 - {  
356 - $c->name = " "; 374 + if($c->name == ""){
  375 + $c->name = " ";
357 } 376 }
358 } 377 }
359 //inclui extensao geografica 378 //inclui extensao geografica
@@ -385,8 +404,18 @@ else{ @@ -385,8 +404,18 @@ else{
385 $l->setprocessing("LABEL_NO_CLIP=True"); 404 $l->setprocessing("LABEL_NO_CLIP=True");
386 $l->setprocessing("POLYLINE_NO_CLIP=True"); 405 $l->setprocessing("POLYLINE_NO_CLIP=True");
387 } 406 }
388 - ms_newLayerObj($oMap, $l);  
389 - //$req->setParameter("LAYERS", "mundo"); 407 + //
  408 + //verifica se existem parametros de substituicao passados via url
  409 + //
  410 + $parametro = $_GET["map_layer_".$l->name."_filter"];
  411 + //echo $parametro;exit;
  412 + if(!empty($parametro)){
  413 + $l->setfilter($parametro);
  414 + $cache = false;
  415 + }
  416 +
  417 + ms_newLayerObj($oMap, $l);
  418 + //$req->setParameter("LAYERS", "mundo");
390 } 419 }
391 } 420 }
392 } 421 }
@@ -398,10 +427,10 @@ else{ @@ -398,10 +427,10 @@ else{
398 include_once($locaplic."/pacotes/gvsig/gvsig2mapfile/class.gvsig2mapfile.php"); 427 include_once($locaplic."/pacotes/gvsig/gvsig2mapfile/class.gvsig2mapfile.php");
399 $gm = new gvsig2mapfile($locaplic."/temas/".$tx.".gvp"); 428 $gm = new gvsig2mapfile($locaplic."/temas/".$tx.".gvp");
400 $gvsigview = $gm->getViewsNames(); 429 $gvsigview = $gm->getViewsNames();
401 - foreach($gvsigview as $gv){ 430 + foreach($gvsigview as $gv){
402 $dataView = $gm->getViewData($gv); 431 $dataView = $gm->getViewData($gv);
403 $oMap = $gm->addLayers($oMap,$gv,$dataView["layerNames"]); 432 $oMap = $gm->addLayers($oMap,$gv,$dataView["layerNames"]);
404 - } 433 + }
405 $numlayers = $oMap->numlayers; 434 $numlayers = $oMap->numlayers;
406 $layers = array(); 435 $layers = array();
407 //$layers[] = "default"; 436 //$layers[] = "default";
@@ -424,9 +453,8 @@ else{ @@ -424,9 +453,8 @@ else{
424 } 453 }
425 if($l->type == MS_LAYER_RASTER && $l->numclasses > 0){ 454 if($l->type == MS_LAYER_RASTER && $l->numclasses > 0){
426 $c = $l->getclass(0); 455 $c = $l->getclass(0);
427 - if($c->name == "")  
428 - {  
429 - $c->name = " "; 456 + if($c->name == ""){
  457 + $c->name = " ";
430 } 458 }
431 } 459 }
432 //inclui extensao geografica 460 //inclui extensao geografica
@@ -435,6 +463,12 @@ else{ @@ -435,6 +463,12 @@ else{
435 $extensao = $extensaoMap; 463 $extensao = $extensaoMap;
436 } 464 }
437 $l->setmetadata("wms_extent",$extensao); 465 $l->setmetadata("wms_extent",$extensao);
  466 + //
  467 + //numero de pixels que serao considerados para corte da imagem no caso de cache ativo e tema de pontos
  468 + //
  469 + if ($l->getmetadata("cortepixels") != ""){
  470 + $cortePixels = $l->getmetadata("cortepixels");
  471 + }
438 } 472 }
439 $req->setParameter("LAYERS", implode(",",$layers)); 473 $req->setParameter("LAYERS", implode(",",$layers));
440 $req->setParameter("STYLES", ""); 474 $req->setParameter("STYLES", "");
@@ -446,8 +480,8 @@ else{ @@ -446,8 +480,8 @@ else{
446 $conta = 0; 480 $conta = 0;
447 $int = explode(",",$intervalo); 481 $int = explode(",",$intervalo);
448 $codigosTema = array(); 482 $codigosTema = array();
449 - if(empty($perfil)){  
450 - $perfil = ""; 483 + if(empty($perfil)){
  484 + $perfil = "";
451 } 485 }
452 include("classesphp/classe_menutemas.php"); 486 include("classesphp/classe_menutemas.php");
453 $m = new Menutemas("",$perfil,$locaplic,$urli3geo); 487 $m = new Menutemas("",$perfil,$locaplic,$urli3geo);
@@ -472,6 +506,7 @@ else{ @@ -472,6 +506,7 @@ else{
472 //echo "<pre>"; 506 //echo "<pre>";
473 //var_dump($codigosTema); 507 //var_dump($codigosTema);
474 //exit; 508 //exit;
  509 +
475 foreach($codigosTema as $c){ 510 foreach($codigosTema as $c){
476 $codigoTema = $c["tema"]; 511 $codigoTema = $c["tema"];
477 if(file_exists($locaplic."/temas/".$codigoTema.".map")){ 512 if(file_exists($locaplic."/temas/".$codigoTema.".map")){
@@ -486,9 +521,8 @@ else{ @@ -486,9 +521,8 @@ else{
486 if (($conta >= $int[0]) && ($conta <= $int[1])){ 521 if (($conta >= $int[0]) && ($conta <= $int[1])){
487 $l = $nmap->getlayerbyname($t); 522 $l = $nmap->getlayerbyname($t);
488 $extensao = $l->getmetadata("EXTENSAO"); 523 $extensao = $l->getmetadata("EXTENSAO");
489 - if($extensao == "")  
490 - {  
491 - $extensao = $extensaoMap; 524 + if($extensao == ""){
  525 + $extensao = $extensaoMap;
492 } 526 }
493 $l->setmetadata("wms_extent",$extensao); 527 $l->setmetadata("wms_extent",$extensao);
494 528
@@ -499,21 +533,27 @@ else{ @@ -499,21 +533,27 @@ else{
499 $l->set("dump",MS_TRUE); 533 $l->set("dump",MS_TRUE);
500 $l->setmetadata("WMS_INCLUDE_ITEMS","all"); 534 $l->setmetadata("WMS_INCLUDE_ITEMS","all");
501 $l->setmetadata("WFS_INCLUDE_ITEMS","all"); 535 $l->setmetadata("WFS_INCLUDE_ITEMS","all");
502 -  
503 - if($l->getmetadata("ows_metadataurl_href") == ""){ 536 + if($l->getmetadata("ows_metadataurl_href") == ""){
504 $l->setmetadata("ows_metadataurl_href",$c["fonte"]); 537 $l->setmetadata("ows_metadataurl_href",$c["fonte"]);
505 $l->setmetadata("ows_metadataurl_type","TC211"); 538 $l->setmetadata("ows_metadataurl_type","TC211");
506 $l->setmetadata("ows_metadataurl_format","text/html"); 539 $l->setmetadata("ows_metadataurl_format","text/html");
507 - } 540 + }
508 if(file_exists($locaplic."/temas/miniaturas/".$t.".map.mini.png")){ 541 if(file_exists($locaplic."/temas/miniaturas/".$t.".map.mini.png")){
509 $mini = $proto.$server.dirname($_SERVER['PHP_SELF'])."/temas/miniaturas/".$t.".map.mini.png"; 542 $mini = $proto.$server.dirname($_SERVER['PHP_SELF'])."/temas/miniaturas/".$t.".map.mini.png";
510 $l->setmetadata("wms_attribution_logourl_format","image/png"); 543 $l->setmetadata("wms_attribution_logourl_format","image/png");
511 $l->setmetadata("wms_attribution_logourl_height","50"); 544 $l->setmetadata("wms_attribution_logourl_height","50");
512 $l->setmetadata("wms_attribution_logourl_width","50"); 545 $l->setmetadata("wms_attribution_logourl_width","50");
513 $l->setmetadata("wms_attribution_logourl_href",$mini); 546 $l->setmetadata("wms_attribution_logourl_href",$mini);
514 - } 547 + }
  548 + //
  549 + //numero de pixels que serao considerados para corte da imagem no caso de cache ativo e tema de pontos
  550 + //
  551 + if ($l->getmetadata("cortepixels") != ""){
  552 + $cortePixels = $l->getmetadata("cortepixels");
  553 + }
515 cloneInlineSymbol($l,$nmap,$oMap); 554 cloneInlineSymbol($l,$nmap,$oMap);
516 ms_newLayerObj($oMap, $l); 555 ms_newLayerObj($oMap, $l);
  556 +
517 } 557 }
518 } 558 }
519 } 559 }
@@ -528,63 +568,92 @@ else{ @@ -528,63 +568,92 @@ else{
528 } 568 }
529 } 569 }
530 } 570 }
531 - }  
532 - }  
533 - $oMap->setSymbolSet($locaplic."/symbols/".basename($oMap->symbolsetfilename));  
534 - $oMap->setFontSet($locaplic."/symbols/".basename($oMap->fontsetfilename));  
535 - $oMap->save($nomeMapfileTmp);  
536 - $oMap = ms_newMapobj($nomeMapfileTmp);  
537 -} 571 + }
  572 + }
  573 + $oMap->setSymbolSet($locaplic."/symbols/".basename($oMap->symbolsetfilename));
  574 + $oMap->setFontSet($locaplic."/symbols/".basename($oMap->fontsetfilename));
  575 + $oMap->save($nomeMapfileTmp);
  576 + $oMap = ms_newMapobj($nomeMapfileTmp);
  577 +}
538 if(ob_get_contents ()){ 578 if(ob_get_contents ()){
539 ob_end_clean(); 579 ob_end_clean();
540 } 580 }
541 -//  
542 -//verifica se a requisicao e do tipo TMS.  
543 -//  
544 -//  
545 -//calcula a extensao geografica com base no x,y,z em requisições TMS  
546 -//quando for do tipo tms $_GET["tms"] contem os parametros do tile  
547 -//essa rotina faz um exit ao final  
548 -//o cache tms so fucniona se houver apenas uma camada no mapa  
549 -//tms e usado basicamente por mashup ou openlayers  
550 -//  
551 -if(isset($_GET["tms"])){  
552 - $temp = explode("/",$_GET["tms"]);  
553 - $z = $temp[2];  
554 - $x = $temp[3];  
555 - $y = str_replace(".png","",$temp[4]);  
556 - $n = pow(2,$z+1);  
557 - $lon1 = $x / $n * 360.0 - 180.0;  
558 - $lon2 = ($x+1) / $n * 360.0 - 180.0;  
559 - $n = pow(2,$z);  
560 - $lat1 = $y / $n * 180.0 - 90.0;  
561 - $lat2 = ($y+1) / $n * 180.0 - 90.0;  
562 - //essa funcao termina o processo se a imagem existir  
563 - if($cache == true){  
564 - carregaCacheImagem($cachedir,$nomeMapfileTmp,$_GET["tms"]);  
565 - }  
566 - //se nao existir, salva a imagem  
567 - //echo $lon1." ".$lat1." ".$lon2." ".$lat2;exit;  
568 - $oMap->setExtent($lon1,$lat1,$lon2,$lat2);  
569 - $oMap->setsize(256,256);  
570 - $oMap->getlayer(0)->set("status",MS_DEFAULT);  
571 - $img = $oMap->draw();  
572 - if($img->imagepath == ""){  
573 - exit;  
574 - }  
575 - if($cache == true){  
576 - salvaCacheImagem($cachedir,$nomeMapfileTmp,$_GET["tms"]);  
577 - }  
578 - renderNocacheTms();  
579 -} 581 +//
  582 +//verifica se a requisicao e do tipo TMS.
  583 +//
  584 +//
  585 +//calcula a extensao geografica com base no x,y,z em requisisoes TMS
  586 +//quando for do tipo tms $_GET["tms"] contem os parametros do tile
  587 +//essa rotina faz um exit ao final
  588 +//o cache tms so fucniona se houver apenas uma camada no mapa
  589 +//tms e usado basicamente por mashup ou openlayers
  590 +//
  591 +if(isset($_GET["tms"])){
  592 + $temp = explode("/",$_GET["tms"]);
  593 + $z = $temp[2];
  594 + $x = $temp[3];
  595 + $y = str_replace(".png","",$temp[4]);
  596 + $n = pow(2,$z+1);
  597 + $lon1 = $x / $n * 360.0 - 180.0;
  598 + $lon2 = ($x+1) / $n * 360.0 - 180.0;
  599 + $n = pow(2,$z);
  600 + $lat1 = $y / $n * 180.0 - 90.0;
  601 + $lat2 = ($y+1) / $n * 180.0 - 90.0;
  602 + //essa funcao termina o processo se a imagem existir
  603 + if($cache == true){
  604 + carregaCacheImagem($cachedir,$nomeMapfileTmp,$_GET["tms"]);
  605 + }
  606 + $layer0 = $oMap->getlayer(0);
  607 + //
  608 + //numero de pixels que serao considerados para corte da imagem no caso de cache ativo e tema de pontos
  609 + //
  610 + if ($layer0->getmetadata("cortepixels") != ""){
  611 + $cortePixels = $layer0->getmetadata("cortepixels");
  612 + }
  613 + //se nao existir, salva a imagem
  614 + //echo $lon1." ".$lat1." ".$lon2." ".$lat2;exit;
  615 + $oMap->setsize(256,256);
  616 +
  617 + $oMap->setExtent($lon1,$lat1,$lon2,$lat2);
  618 +
  619 + $layer0->set("status",MS_DEFAULT);
  620 + //
  621 + //se o layer foi marcado para corte altera os parametros para ampliar o mapa
  622 + //antes de gerar a imagem
  623 + //
  624 + if($cortePixels > 0){
  625 + //$oMap->prepareImage();
  626 + $escalaInicial = $oMap->scaledenom;
  627 + $extensaoInicial = $oMap->extent;
  628 + $wh = 256+($cortePixels*2);
  629 + $oMap->setsize($wh,$wh);
  630 + $ponto = new pointObj();
  631 + $ponto->setxy(($wh/2),($wh/2));
  632 + $oMap->zoomScale($escalaInicial, $ponto, $wh, $wh, $extensaoInicial);
  633 + }
  634 + $img = $oMap->draw();
  635 + if($img->imagepath == ""){
  636 + exit;
  637 + }
  638 + if($cache == true){
  639 + salvaCacheImagem($cachedir,$nomeMapfileTmp,$_GET["tms"]);
  640 + }
  641 + renderNocacheTms();
  642 +}
580 // 643 //
581 //verifica se a chamada do servico e do tipo TILE no padrao do Google 644 //verifica se a chamada do servico e do tipo TILE no padrao do Google
582 // 645 //
583 -if(isset($_GET["Z"]) && isset($_GET["X"])){ 646 +if(isset($_GET["Z"]) && isset($_GET["X"])){
584 $x = $_GET["X"]; 647 $x = $_GET["X"];
585 $y = $_GET["Y"]; 648 $y = $_GET["Y"];
586 $z = $_GET["Z"]; 649 $z = $_GET["Z"];
587 - $layer0 = $oMap->getlayer(0); 650 + $layer0 = $oMap->getlayer(0);
  651 + //
  652 + //numero de pixels que serao considerados para corte da imagem no caso de cache ativo e tema de pontos
  653 + //
  654 + if ($layer0->getmetadata("cortepixels") != ""){
  655 + $cortePixels = $layer0->getmetadata("cortepixels");
  656 + }
588 if($cache == true){ 657 if($cache == true){
589 carregaCacheImagem($cachedir,$nomeMapfileTmp,"/googlemaps/$layer0->name/$z/$x/$y"); 658 carregaCacheImagem($cachedir,$nomeMapfileTmp,"/googlemaps/$layer0->name/$z/$x/$y");
590 } 659 }
@@ -606,43 +675,52 @@ if(isset($_GET[&quot;Z&quot;]) &amp;&amp; isset($_GET[&quot;X&quot;])){ @@ -606,43 +675,52 @@ if(isset($_GET[&quot;Z&quot;]) &amp;&amp; isset($_GET[&quot;X&quot;])){
606 $poPoint1->project($projInObj, $projOutObj); 675 $poPoint1->project($projInObj, $projOutObj);
607 $poPoint2 = ms_newpointobj(); 676 $poPoint2 = ms_newpointobj();
608 $poPoint2->setXY($lon2, $lat2); 677 $poPoint2->setXY($lon2, $lat2);
609 - $poPoint2->project($projInObj, $projOutObj);  
610 - $oMap->setExtent($poPoint1->x,$poPoint1->y,$poPoint2->x,$poPoint2->y); 678 + $poPoint2->project($projInObj, $projOutObj);
611 $oMap->setsize(256,256); 679 $oMap->setsize(256,256);
612 - $oMap->getlayer(0)->set("status",MS_DEFAULT);  
613 - $oMap->setProjection("proj=merc,a=6378137,b=6378137,lat_ts=0.0,lon_0=0.0,x_0=0.0,y_0=0,k=1.0,units=m");  
614 - $layer0->setProjection("proj=latlong,a=6378137,b=6378137");  
615 - //$oMap->save(); 680 + $oMap->setExtent($poPoint1->x,$poPoint1->y,$poPoint2->x,$poPoint2->y);
  681 +
  682 + $oMap->getlayer(0)->set("status",MS_DEFAULT);
  683 + $oMap->setProjection("proj=merc,a=6378137,b=6378137,lat_ts=0.0,lon_0=0.0,x_0=0.0,y_0=0,k=1.0,units=m");
  684 + $layer0->setProjection("proj=latlong,a=6378137,b=6378137");
  685 + //
  686 + //se o layer foi marcado para corte altera os parametros para ampliar o mapa
  687 + //antes de gerar a imagem
  688 + //
  689 + if($cortePixels > 0){
  690 + //$oMap->prepareImage();
  691 + $escalaInicial = $oMap->scaledenom;
  692 + $extensaoInicial = $oMap->extent;
  693 + $wh = 256+($cortePixels*2);
  694 + $oMap->setsize($wh,$wh);
  695 + $ponto = new pointObj();
  696 + $ponto->setxy(($wh/2),($wh/2));
  697 + $oMap->zoomScale($escalaInicial, $ponto, $wh, $wh, $extensaoInicial);
  698 + }
616 $img = $oMap->draw(); 699 $img = $oMap->draw();
617 if($img->imagepath == ""){ 700 if($img->imagepath == ""){
618 exit; 701 exit;
619 - }  
620 - /**  
621 - * @TODO ativar cache  
622 - */  
623 - 702 + }
624 if($cache == true){ 703 if($cache == true){
625 - salvaCacheImagem($cachedir,$nomeMapfileTmp,"/googlemaps/$layer0->name/$z/$x/$y");  
626 - }  
627 - renderNocacheTms();  
628 -}  
629 -if(strtolower($req->getValueByName("REQUEST")) == "getlegendgraphic"){  
630 - $l = $oMap->getlayer(0);  
631 - if($req->getValueByName("LAYER") == ""){  
632 - $req->setParameter("LAYER",$l->name);  
633 - } 704 + salvaCacheImagem($cachedir,$nomeMapfileTmp,"/googlemaps/$layer0->name/$z/$x/$y");
  705 + }
  706 + renderNocacheTms();
  707 +}
  708 +if(strtolower($req->getValueByName("REQUEST")) == "getlegendgraphic"){
  709 + $l = $oMap->getlayer(0);
  710 + if($req->getValueByName("LAYER") == ""){
  711 + $req->setParameter("LAYER",$l->name);
  712 + }
634 if($req->getValueByName("FORMAT") == ""){ 713 if($req->getValueByName("FORMAT") == ""){
635 $req->setParameter("FORMAT","image/png"); 714 $req->setParameter("FORMAT","image/png");
636 } 715 }
637 - 716 + $legenda = $oMap->legend;
  717 + $legenda->set("status",MS_DEFAULT);
  718 + $l->set("minscaledenom",0);
  719 + $l->set("maxscaledenom",0);
638 if($req->getValueByName("FORMAT") == "text/html"){ 720 if($req->getValueByName("FORMAT") == "text/html"){
639 $req->setParameter("FORMAT","image/png"); 721 $req->setParameter("FORMAT","image/png");
640 $l = $oMap->getlayerbyname($req->getValueByName("LAYER")); 722 $l = $oMap->getlayerbyname($req->getValueByName("LAYER"));
641 $l->set("status",MS_DEFAULT); 723 $l->set("status",MS_DEFAULT);
642 - $l->set("minscaledenom",0);  
643 - $l->set("maxscaledenom",0);  
644 - $legenda = $oMap->legend;  
645 - $legenda->set("status",MS_DEFAULT);  
646 $legenda->set("template",$locaplic."/aplicmap/legendaOgc.html"); 724 $legenda->set("template",$locaplic."/aplicmap/legendaOgc.html");
647 725
648 $tmparray["my_tag"] = "value_of_my_tag"; 726 $tmparray["my_tag"] = "value_of_my_tag";
@@ -653,14 +731,29 @@ if(strtolower($req-&gt;getValueByName(&quot;REQUEST&quot;)) == &quot;getlegendgraphic&quot;){ @@ -653,14 +731,29 @@ if(strtolower($req-&gt;getValueByName(&quot;REQUEST&quot;)) == &quot;getlegendgraphic&quot;){
653 echo $leg;exit; 731 echo $leg;exit;
654 } 732 }
655 } 733 }
656 -  
657 -} 734 +
  735 +}
658 if(strtolower($req->getValueByName("REQUEST")) == "getfeature"){ 736 if(strtolower($req->getValueByName("REQUEST")) == "getfeature"){
659 $l = $oMap->getlayer(0); 737 $l = $oMap->getlayer(0);
660 if($req->getValueByName("TYPENAME") == "" || $req->getValueByName("TYPENAME") == "undefined"){ 738 if($req->getValueByName("TYPENAME") == "" || $req->getValueByName("TYPENAME") == "undefined"){
661 $req->setParameter("TYPENAME",$l->name); 739 $req->setParameter("TYPENAME",$l->name);
662 } 740 }
663 -} 741 + if($l->getProjection() == "" ){
  742 + $l->setProjection("proj=latlong,a=6378137,b=6378137");
  743 + }
  744 + if(strtolower($req->getValueByName("SRS")) == "epsg:900913"){
  745 + $req->setParameter("SRS","EPSG:3857");
  746 + }
  747 +}
  748 +if(strtolower($req->getValueByName("REQUEST")) == "getfeatureinfo"){
  749 + $l = $oMap->getlayer(0);
  750 + $req->setParameter("LAYERS",$l->name);
  751 + $req->setParameter("QUERY_LAYERS",$l->name);
  752 + if(strtolower($req->getValueByName("SRS")) == "epsg:900913"){
  753 + $req->setParameter("SRS","EPSG:3857");
  754 + $_GET["SRS"] = "EPSG:3857";
  755 + }
  756 +}
664 // 757 //
665 //altera os caminhos das imagens 758 //altera os caminhos das imagens
666 // 759 //
@@ -668,14 +761,55 @@ if((isset($legenda)) &amp;&amp; (strtolower($legenda) == &quot;sim&quot;)){ @@ -668,14 +761,55 @@ if((isset($legenda)) &amp;&amp; (strtolower($legenda) == &quot;sim&quot;)){
668 $leg = $oMap->legend; 761 $leg = $oMap->legend;
669 $leg->set("status",MS_EMBED); 762 $leg->set("status",MS_EMBED);
670 } 763 }
671 -ms_ioinstallstdouttobuffer(); 764 +//
  765 +//altera o outputformat
  766 +//
  767 +if(isset($OUTPUTFORMAT)){
  768 + if(strtolower($OUTPUTFORMAT) == "shape-zip"){
  769 + $l = $oMap->getlayer(0);
  770 + $n = $l->name;
  771 + $oMap->selectOutputFormat("shape-zip");
  772 + $oMap->outputformat->setOption("STORAGE", "memory");
  773 + $oMap->outputformat->setOption("FORM", "zip");
  774 + $oMap->outputformat->setOption("FILENAME", $n.".zip");
  775 + $l->setmetadata("wfs_getfeature_formatlist","shape-zip");
  776 + $oMap->save($nomeMapfileTmp);
  777 + if(strtolower($request) != "getcapabilities"){
  778 + header('Content-Disposition: attachment; filename='.$n.'.zip');
  779 + }
  780 + }
  781 + if(strtolower($OUTPUTFORMAT) == "csv"){
  782 + $l = $oMap->getlayer(0);
  783 + $n = $l->name."-csv";
  784 + $oMap->selectOutputFormat("csv");
  785 + $oMap->outputformat->setOption("STORAGE", "memory");
  786 + $oMap->outputformat->setOption("FILENAME", $n.".zip");
  787 + $oMap->outputformat->setOption("FORM", "zip");
  788 + $l->setmetadata("wfs_getfeature_formatlist","csv");
  789 + $oMap->save($nomeMapfileTmp);
  790 + if(strtolower($request) != "getcapabilities"){
  791 + header('Content-Disposition: attachment; filename='.$n.'.zip');
  792 + }
  793 + }
  794 + //FIXME envia uma linha estranha no header. Nao da pra usar
  795 + if(strtolower($OUTPUTFORMAT) == "geojson"){
  796 + $l = $oMap->getlayer(0);
  797 + $oMap->selectOutputFormat("geojson");
  798 + $l->setmetadata("wfs_getfeature_formatlist","geojson");
  799 + $oMap->save($nomeMapfileTmp);
  800 + header("Content-type: application/json; subtype=geojson");
  801 + }
  802 +}
  803 +ms_ioinstallstdouttobuffer();
672 $oMap->owsdispatch($req); 804 $oMap->owsdispatch($req);
673 $contenttype = ms_iostripstdoutbuffercontenttype(); 805 $contenttype = ms_iostripstdoutbuffercontenttype();
674 -if(strtolower($request) == "getcapabilities"){  
675 - header('Content-Disposition: attachment; filename=getcapabilities.xml'); 806 +if(strtolower($request) == "getcapabilities"){
  807 + header('Content-Disposition: attachment; filename=getcapabilities.xml');
  808 +}
  809 +
  810 +if(!isset($OUTPUTFORMAT)){
  811 + header("Content-type: $contenttype");
676 } 812 }
677 -//header("Content-type: application/xml");  
678 -header("Content-type: $contenttype");  
679 813
680 $buffer = ms_iogetStdoutBufferBytes(); 814 $buffer = ms_iogetStdoutBufferBytes();
681 ms_ioresethandlers(); 815 ms_ioresethandlers();
@@ -684,13 +818,13 @@ ms_ioresethandlers(); @@ -684,13 +818,13 @@ ms_ioresethandlers();
684 // 818 //
685 function ogc_pegaListaDeMenus(){ 819 function ogc_pegaListaDeMenus(){
686 global $perfil,$locaplic,$urli3geo; 820 global $perfil,$locaplic,$urli3geo;
687 - if(!isset($perfil)){  
688 - $perfil = ""; 821 + if(!isset($perfil)){
  822 + $perfil = "";
689 } 823 }
690 $m = new Menutemas("",$perfil,$locsistemas,$locaplic,"",$urli3geo); 824 $m = new Menutemas("",$perfil,$locsistemas,$locaplic,"",$urli3geo);
691 foreach($m->pegaListaDeMenus() as $menu) 825 foreach($m->pegaListaDeMenus() as $menu)
692 - {  
693 - $menus[] = $urli3geo."/admin/xmlmenutemas.php?id_menu=".$menu["idmenu"]; 826 + {
  827 + $menus[] = $urli3geo."/admin/xmlmenutemas.php?id_menu=".$menu["idmenu"];
694 } 828 }
695 return $menus; 829 return $menus;
696 } 830 }
@@ -701,11 +835,11 @@ function ogc_imprimeAjuda(){ @@ -701,11 +835,11 @@ function ogc_imprimeAjuda(){
701 echo "Para escolher um tema, utilize:<br>"; 835 echo "Para escolher um tema, utilize:<br>";
702 echo "ogc.php?lista=temas - para listar os temas dispon&iacute;veis<br>"; 836 echo "ogc.php?lista=temas - para listar os temas dispon&iacute;veis<br>";
703 echo "Para usar esse web service, al&eacute;m dos par&acirc;metros normais, vc dever&aacute; incluir o par&acirc;metro &tema=,<br>"; 837 echo "Para usar esse web service, al&eacute;m dos par&acirc;metros normais, vc dever&aacute; incluir o par&acirc;metro &tema=,<br>";
704 - echo "ou seja,http://[host]/i3geo/ogc.php?tema=[código do tema]<br>";  
705 - echo "no lugar do código pode ser especificado tamb&eacute;m um arquivo mapfile qualquer. Nesse caso, deve ser digitado o caminho completo no servidor<br><br>"; 838 + echo "ou seja,http://[host]/i3geo/ogc.php?tema=[c&oacute;digo do tema]<br>";
  839 + echo "no lugar do c&ocaute;digo pode ser especificado tamb&eacute;m um arquivo mapfile qualquer. Nesse caso, deve ser digitado o caminho completo no servidor<br><br>";
706 echo "Utilize o sistema de administra&ccedil;&atilde;o do i3Geo para configurar quais os temas da pasta i3geo/temas podem ser utilizados."; 840 echo "Utilize o sistema de administra&ccedil;&atilde;o do i3Geo para configurar quais os temas da pasta i3geo/temas podem ser utilizados.";
707 echo "Utilize o parametro &intervalo=0,20 para definir o n&uacute;mero de temas desejado na fun&ccedil;&atilde;o getcapabilities."; 841 echo "Utilize o parametro &intervalo=0,20 para definir o n&uacute;mero de temas desejado na fun&ccedil;&atilde;o getcapabilities.";
708 - echo "Utilize o parametro restauramapa para indicar o ID de um mapa salvo no banco de dados de administra&ccedil;&atilde;o para utiliz&aacute;-lo como um WMS"; 842 + echo "Utilize o parametro restauramapa para indicar o ID de um mapa salvo no banco de dados de administra&ccedil;&atilde;o para utiliz&aacute;-lo como um WMS";
709 } 843 }
710 function ogc_imprimeListaDeTemas(){ 844 function ogc_imprimeListaDeTemas(){
711 global $urli3geo,$perfil,$locaplic; 845 global $urli3geo,$perfil,$locaplic;
@@ -779,39 +913,53 @@ function ogc_imprimeListaDeTemasWfs(){ @@ -779,39 +913,53 @@ function ogc_imprimeListaDeTemasWfs(){
779 } 913 }
780 echo $imprimir."</body></html>"; 914 echo $imprimir."</body></html>";
781 } 915 }
782 -function carregaCacheImagem($cachedir,$map,$tms){  
783 - global $dir_tmp;  
784 - if($cachedir == ""){  
785 - $nome = $dir_tmp."/cache".$tms;  
786 - }  
787 - else{  
788 - $nome = $cachedir.$tms;  
789 - }  
790 - if(file_exists($nome)){  
791 - header('Content-Length: '.filesize($nome));  
792 - header('Content-Type: image/png');  
793 - header('Cache-Control: max-age=3600, must-revalidate');  
794 - header('Expires: ' . gmdate('D, d M Y H:i:s', time()+24*60*60) . ' GMT');  
795 - header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($nome)).' GMT', true, 200);  
796 - $etag = md5_file($nome);  
797 - header('Etag: '.$etag);  
798 - fpassthru(fopen($nome, 'rb'));  
799 - exit;  
800 - }  
801 -} 916 +function carregaCacheImagem($cachedir,$map,$tms){
  917 + global $dir_tmp;
  918 + if($cachedir == ""){
  919 + $nome = $dir_tmp."/cache".$tms;
  920 + }
  921 + else{
  922 + $nome = $cachedir.$tms;
  923 + }
  924 + if(file_exists($nome)){
  925 + header('Content-Length: '.filesize($nome));
  926 + header('Content-Type: image/png');
  927 + header('Cache-Control: max-age=3600, must-revalidate');
  928 + header('Expires: ' . gmdate('D, d M Y H:i:s', time()+24*60*60) . ' GMT');
  929 + header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($nome)).' GMT', true, 200);
  930 + $etag = md5_file($nome);
  931 + header('Etag: '.$etag);
  932 + fpassthru(fopen($nome, 'rb'));
  933 + exit;
  934 + }
  935 +}
802 function salvaCacheImagem($cachedir,$map,$tms){ 936 function salvaCacheImagem($cachedir,$map,$tms){
803 - global $img,$dir_tmp; 937 + global $img,$dir_tmp,$cortePixels;
804 if($cachedir == ""){ 938 if($cachedir == ""){
805 $nome = $dir_tmp."/cache".$tms; 939 $nome = $dir_tmp."/cache".$tms;
806 } 940 }
807 else{ 941 else{
808 $nome = $cachedir.$tms; 942 $nome = $cachedir.$tms;
809 - } 943 + }
810 @mkdir(dirname($nome),0777,true); 944 @mkdir(dirname($nome),0777,true);
811 - chmod(dirname($nome),0777); 945 + chmod(dirname($nome),0777);
812 $img->saveImage($nome); 946 $img->saveImage($nome);
813 - chmod($nome,0777); 947 + //
  948 + //corta a imagem gerada para voltar ao tamanho normal
  949 + //
  950 + if($cortePixels > 0){
  951 + $img = imagecreatefrompng($nome);
  952 + $imgc = imagecreate(256,256);
814 953
  954 + imagesavealpha($imgc, true);
  955 + // Fill the image with transparent color
  956 + $color = imagecolorallocatealpha($imgc,0x00,0x00,0x00,127);
  957 + imagefill($imgc, 0, 0, $color);
  958 +
  959 + imagecopy($imgc, $img, 0 , 0 , $cortePixels , $cortePixels , 256, 256);
  960 + imagepng($imgc,$nome);
  961 + }
  962 + chmod($nome,0777);
815 header('Content-Length: '.filesize($nome)); 963 header('Content-Length: '.filesize($nome));
816 header('Content-Type: image/png'); 964 header('Content-Type: image/png');
817 header('Cache-Control: max-age=3600, must-revalidate'); 965 header('Cache-Control: max-age=3600, must-revalidate');
@@ -819,15 +967,15 @@ function salvaCacheImagem($cachedir,$map,$tms){ @@ -819,15 +967,15 @@ function salvaCacheImagem($cachedir,$map,$tms){
819 header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($nome)).' GMT', true, 200); 967 header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($nome)).' GMT', true, 200);
820 fpassthru(fopen($nome, 'rb')); 968 fpassthru(fopen($nome, 'rb'));
821 exit; 969 exit;
822 -}  
823 -function texto2iso($texto){  
824 - if (function_exists("mb_convert_encoding")){  
825 - if (mb_detect_encoding($texto,"UTF-8",true)){  
826 - $texto = mb_convert_encoding($texto,"ISO-8859-1","UTF-8");  
827 - }  
828 - }  
829 - return $texto;  
830 -} 970 +}
  971 +function texto2iso($texto){
  972 + if (function_exists("mb_convert_encoding")){
  973 + if (mb_detect_encoding($texto,"UTF-8",true)){
  974 + $texto = mb_convert_encoding($texto,"ISO-8859-1","UTF-8");
  975 + }
  976 + }
  977 + return $texto;
  978 +}
831 function nomeRand($n=10) 979 function nomeRand($n=10)
832 { 980 {
833 $nomes = ""; 981 $nomes = "";
@@ -836,32 +984,44 @@ function nomeRand($n=10) @@ -836,32 +984,44 @@ function nomeRand($n=10)
836 for($i=0; $i < $n; ++$i) 984 for($i=0; $i < $n; ++$i)
837 {$nomes .= $a{mt_rand(0, $max)};} 985 {$nomes .= $a{mt_rand(0, $max)};}
838 return $nomes; 986 return $nomes;
839 -}  
840 -function renderNocacheTms(){  
841 - global $img,$i3georendermode,$dir_tmp;  
842 - if($i3georendermode == 0 || !isset($i3georendermode)){  
843 - $nomer = $dir_tmp."/temp".nomeRand().".png";  
844 - $img->saveImage($nomer);  
845 - header('Content-Length: '.filesize($nomer));  
846 - header('Content-Type: image/png');  
847 - header('Cache-Control: max-age=3600, must-revalidate');  
848 - header('Expires: ' . gmdate('D, d M Y H:i:s', time()+24*60*60) . ' GMT');  
849 - header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($nomer)).' GMT', true, 200);  
850 - fpassthru(fopen($nomer, 'rb'));  
851 - }  
852 - if($i3georendermode == 1){ 987 +}
  988 +function renderNocacheTms(){
  989 + global $img,$i3georendermode,$dir_tmp,$cortePixels;
  990 + if($i3georendermode == 1 && $cortePixels == 0){
853 ob_clean(); 991 ob_clean();
854 header('Content-Type: image/png'); 992 header('Content-Type: image/png');
855 $img->saveImage(); 993 $img->saveImage();
  994 + exit;
  995 + }
  996 + if($i3georendermode == 1 && $cortePixels > 0){
  997 + $i3georendermode = 0;
  998 + }
  999 + $nomer = $dir_tmp."/temp".nomeRand().".png";
  1000 + $img->saveImage($nomer);
  1001 + //
  1002 + //corta a imagem gerada para voltar ao tamanho normal
  1003 + //
  1004 + if($cortePixels > 0){
  1005 + $img = imagecreatefrompng($nomer);
  1006 + $imgc = imagecreate(256,256);
  1007 + imagecopy( $imgc, $img, 0 , 0 , $cortePixels , $cortePixels , 256, 256 );
  1008 + imagepng($imgc,$nomer);
  1009 + }
  1010 + if($i3georendermode == 0 || !isset($i3georendermode)){
  1011 +
  1012 + header('Content-Length: '.filesize($nomer));
  1013 + header('Content-Type: image/png');
  1014 + header('Cache-Control: max-age=3600, must-revalidate');
  1015 + header('Expires: ' . gmdate('D, d M Y H:i:s', time()+24*60*60) . ' GMT');
  1016 + header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($nomer)).' GMT', true, 200);
  1017 + fpassthru(fopen($nomer, 'rb'));
856 } 1018 }
857 if($i3georendermode == 2){ 1019 if($i3georendermode == 2){
858 - $nomer = $dir_tmp."/temp".nomeRand().".png";  
859 - $img->saveImage($nomer);  
860 ob_clean(); 1020 ob_clean();
861 header('Cache-Control: public, max-age=22222222'); 1021 header('Cache-Control: public, max-age=22222222');
862 header('Expires: ' . gmdate('D, d M Y H:i:s', time()+48*60*60) . ' GMT'); 1022 header('Expires: ' . gmdate('D, d M Y H:i:s', time()+48*60*60) . ' GMT');
863 header("X-Sendfile: $nomer"); 1023 header("X-Sendfile: $nomer");
864 header("Content-type: image/png"); 1024 header("Content-type: image/png");
865 - }  
866 -} 1025 + }
  1026 +}
867 ?> 1027 ?>