svn commit: r674 - trunk/mapbender/http/tools/wms_extent
astrid_emde at osgeo.org
astrid_emde at osgeo.org
Thu Jul 20 05:40:14 EDT 2006
Author: astrid_emde
Date: 2006-07-20 09:40:14+0000
New Revision: 674
Added:
trunk/mapbender/http/tools/wms_extent/
trunk/mapbender/http/tools/wms_extent/info.html
trunk/mapbender/http/tools/wms_extent/mapbender_wms.map
trunk/mapbender/http/tools/wms_extent/wms_geometry.sql
Log:
new folder wms_extent
possibility for postgreSQl/postgis to create a WMS that displays the Extent of a wms.
In addition you cann add a wms by featureInfo to a gui.
For more inforation: http://www.mapbender.org/index.php?title=Wms_extent
Added: trunk/mapbender/http/tools/wms_extent/info.html
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/tools/wms_extent/info.html?view=auto&rev=674
==============================================================================
--- (empty file)
+++ trunk/mapbender/http/tools/wms_extent/info.html 2006-07-20 09:40:14+0000
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<title>WMS Extent</title>
+
+<style type="text/css">
+<!--
+.sbutton{
+ font-family : Verdana, Arial, Helvetica, sans-serif;
+ font-size : 10px;
+ font-weight: normal;
+ border : solid thin;
+ width: 300px;
+ height: 20px;
+ background: #F0F0F0;
+ border-color: #c0c0c0;
+}
+-->
+</style>
+
+</head>
+<body onload='window.resizeTo(800,800);'>
+<table border="1" width="98%" bgcolor="#ffffff" bordercolor ="#B8C1C7" cellspacing="1" cellpadding="2" style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif; font-size:10pt;background-color:#A6B1BB;color:#000000;" rules='rows'>
+ <tr align="left" style="background-color:#F0F0F0">
+ <th align="left" bgcolor='#F0F0F0'>title:</td>
+ <th bgcolor='#F0F0F0'>[wms_title]</td>
+ </tr>
+ <tr>
+ <td bgcolor='#F0F0F0'>epsg:</td>
+ <td bgcolor='#FFFFFF'>[epsg]</td>
+ </tr>
+ <tr>
+ <td bgcolor='#F0F0F0'>getCapabilities:</td>
+ <td bgcolor='#FFFFFF'><a href="[wms_getcapabilities]&REQUEST=getCapabilities&Version=[wms_version]&SERVICE=WMS" target="_blank">getCapabilities-Request</a></td>
+ </tr>
+ <tr>
+ <td bgcolor='#F0F0F0'>load WMS:</td>
+ <td bgcolor='#FFFFFF'>
+ <br>
+ <form name="Formular" action="">
+ <input class='sbutton' type="button" value="Load this WMS to the gui" onClick="window.opener.addWmsFromFeatureInfo('[wms_getcapabilities]','[wms_version]')">
+ </form></td>
+ </tr>
+ <tr>
+ <td bgcolor='#F0F0F0'>abstract:</td>
+ <td bgcolor='#FFFFFF'>[wms_abstract]</td>
+ </tr>
+</table>
+<br>
+</body>
+</html>
+
Added: trunk/mapbender/http/tools/wms_extent/mapbender_wms.map
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/tools/wms_extent/mapbender_wms.map?view=auto&rev=674
==============================================================================
--- (empty file)
+++ trunk/mapbender/http/tools/wms_extent/mapbender_wms.map 2006-07-20 09:40:14+0000
@@ -0,0 +1,103 @@
+MAP
+ NAME "mapbender_wms_extent"
+ STATUS ON
+ EXTENT -180 -90 180 90
+
+ PROJECTION
+ "init=epsg:4326"
+ END
+
+ SIZE 650 420
+
+ IMAGECOLOR 255 255 255
+
+ UNITS dd
+ RESOLUTION 72
+
+
+ WEB
+ METADATA
+ "WMS_SRS" "epsg:4326 epsg:31467 epsg:31466 epsg:31468 espg:31469"
+ "WMS_ONLINERESOURCE" "http://wms1.ccgis.de/cgi-bin/mapserv?map=/data/mapbender_dev/http/tools/wms_extent/mapbender_wms.map"
+ "WMS_TITLE" "WMS Extent"
+ "WMS_FEATURE_INFO_MIME_TYPE" "text/html"
+ "WMS_ABSTRACT" "Overview over the WMS loaded in Mapbender"
+
+ "ows_addresstype" "postal"
+ "ows_address" "Siemensstraße 8"
+ "ows_city" "Bonn"
+ "ows_stateorprovince" "NRW"
+ "ows_postcode" "53121"
+ "ows_country" "Germany"
+ "ows_contactperson" "Astrid Emde"
+ "ows_contactorganization" "CCGIS"
+ "ows_contactposition" "CCGIS"
+ "ows_contactelectronicmailaddress" "astrid_emde at osgeo.org"
+
+ "ows_keywordlist" "Mapbender,OSGEO,Client Suite"
+ END
+ END
+
+ OUTPUTFORMAT
+ NAME 'png'
+ DRIVER 'GD/PNG'
+ MIMETYPE 'image/png'
+ EXTENSION PNG
+ IMAGEMODE PC256
+ TRANSPARENT ON
+ END
+
+ LEGEND
+ STATUS ON
+ KEYSIZE 20 10
+ KEYSPACING 5 5
+ LABEL
+ COLOR 0 0 0#120 120 120
+ TYPE TRUETYPE
+ FONT "arial"
+ SIZE 10
+ END
+ END
+
+#---------------------------------------------------------------
+LAYER
+ NAME "wms_extent"
+ STATUS ON
+ TYPE POLYGON
+ CONNECTIONTYPE postgis
+ CONNECTION "dbname=mapbender user=mypassword port=5432 host=myserver"
+ DATA "the_geom from (Select * from qry_wms_extent where NOT isempty(the_geom)) as foo using unique layer_id using SRID=4326"
+
+
+ PROJECTION
+ "init=epsg:4326"
+ END
+
+ METADATA
+ "WMS_SRS" "epsg:4326"
+ "WMS_TITLE" "WMS Extent"
+ "WMS_FEATURE_INFO_MIME_TYPE" "text/html"
+ END
+
+ SYMBOLSCALE 100000
+
+ TEMPLATE "info.html"
+
+ #TRANSPARENCY 90
+ LABELITEM 'wms_title'
+
+ CLASS
+ NAME "WMS Extent"
+ STYLE
+ SYMBOL 0
+ COLOR -1 -1 -1#255 204 255
+ OUTLINECOLOR 60 60 60
+ END
+ LABEL
+ COLOR 60 60 60
+ END
+
+ END
+
+ END
+END
\ No newline at end of file
Added: trunk/mapbender/http/tools/wms_extent/wms_geometry.sql
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/tools/wms_extent/wms_geometry.sql?view=auto&rev=674
==============================================================================
--- (empty file)
+++ trunk/mapbender/http/tools/wms_extent/wms_geometry.sql 2006-07-20 09:40:14+0000
@@ -0,0 +1,38 @@
+-- Add geometry column the_geom
+Select AddGeometryColumn('mapbender','layer_epsg','the_geom',4326,'POLYGON',2);
+
+-- update the column
+UPDATE layer_epsg set the_geom =
+transform(
+geometryfromText(
+'POLYGON(('||
+layer_epsg.minx || ' ' || layer_epsg.miny || ',' ||
+layer_epsg.minx || ' ' || layer_epsg.maxy || ',' ||
+layer_epsg.maxx || ' ' || layer_epsg.maxy || ',' ||
+layer_epsg.maxx || ' ' || layer_epsg.miny || ',' ||
+layer_epsg.minx || ' ' || layer_epsg.miny ||
+'))',ltrim(epsg,'EPSG:')::int4) ,4326
+)
+where epsg != 'EPSG:31492'
+AND epsg != 'EPSG:31493'
+AND epsg != 'EPSG:31494'
+AND epsg != 'EPSG:42304'
+AND epsg != 'EPSG:102257'
+AND epsg != 'NONE'
+;
+
+-- create a view which is used in the mapfile mapbender_wms.map
+Create view qry_wms_extent as
+Select DISTINCT layer.layer_id,layer.fkey_wms_id,
+layer_pos,
+wms.wms_id, wms.wms_title,wms.wms_version,wms.wms_abstract,wms.wms_getcapabilities,
+layer_epsg.epsg,
+layer_epsg.minx,
+layer_epsg.miny,
+layer_epsg.maxx,
+layer_epsg.maxy,
+layer_epsg.the_geom
+from layer
+LEFT JOIN wms ON wms.wms_id = layer.fkey_wms_id
+LEFT JOIN layer_epsg ON layer.layer_id = layer_epsg.fkey_layer_id
+where layer.layer_pos=0;
More information about the Mapbender_commits
mailing list