Hello list, I want to insert/update/delete polygons in my oracle 9i database. In order to get this working i've chosen to use geoserver 1.6.0-RC3 in combination with openlayers 2.5. Currently i don't know what would be the good way to make this working, but i've started with the sample's wfs-t, http://www.nabble.com/WFS-T-delete-update-td14843989.html, and a lot of other snippets. My question is the following: - What is the way to make the functionality of insert/update/delete (to put it into viewer.php) or is there a sample which can help. (currently insert appears to be working, update misses a image, and not sure how i should implement the delete, but i lack the feeling that i'm following the correct path) client enviroment: ================= Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 server enviroment: ================= Microsoft Windows XP [versie 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. GeoServer 1.6.0-RC3 - GeoServer-1.6.0-RC3-oracle-plugin - Oracle91 Enterprise Edition Release 9.2.0.7.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.7.0 viewer.php ==========

When adding a polygon, use shift-click to stop.

proxy.php: ========== 'allowed' ); // the defualt allowd hosts $defaultAllowedHosts = array( 'www.openlayers.org' => 'allowed', 'openlayers.org' => 'allowed', 'labs.metacarta.com' => 'allowed', 'world.freemap.in' => 'allowed', 'prototype.openmnnd.org' => 'allowed', 'geo.openplans.org' => 'allowed', 'www.openstreetmap.org' => 'allowed' ); // now check the allowed hosts $allowedHosts = array_merge($customAllowedHosts, $defaultAllowedHosts); // now look what our hostname is: $allowedStart = 'http://'; $urlStart = substr($url, 0, strlen($allowedStart)); if($urlStart != $allowedStart) { die("url has to start with '$allowedStart'(started with:'$urlStart')"); } $urlHost = substr($url, strlen($urlStart)); $urlHost = substr($urlHost, 0, strpos($urlHost, '/')); // look if the host is allowed if(!array_key_exists($urlHost, $allowedHosts)){ die("Host: $urlHost not allowed, the following hosts are allowed:" . print_r($allowedHosts, true)); } // add here your proxy settings $proxy_name = 'proxyserver'; $proxy_port = 8080; $proxy_user = "proxy-username"; $proxy_pass = "proxy-password"; $proxy_cont = ''; $proxy_fp = fsockopen($proxy_name, $proxy_port); $proxy_fp || die("could not open proxy server"); fputs($proxy_fp, "GET $url HTTP/1.0\r\nHost: $proxy_name\r\n"); fputs($proxy_fp, "Proxy-Authorization: Basic " . base64_encode ("$proxy_user:$proxy_pass") . "\r\n\r\n"); while(!feof($proxy_fp)) { $proxy_cont .= fread($proxy_fp, 4096); } fclose($proxy_fp); $proxy_cont = substr($proxy_cont, strpos($proxy_cont,"\r\n\r\n") + 4); echo($proxy_cont); ?> geoserver featuresource (info.xml) ================================== MY_TABLE 28992 2 MY_TABLE_Type Generated from oracle / MY_TABLE, oracle geoserver catalog.xml ===================== .... .... .... .... oracle.sql ========== CREATE TABLE MY_TABLE ( GID CHAR(32) DEFAULT RAWTOHEX(sys_guid()) NOT NULL, GEOM MDSYS.SDO_GEOMETRY, CONSTRAINT MY_TABLE_PK PRIMARY KEY (GID) ); INSERT INTO USER_SDO_GEOM_METADATA ( TABLE_NAME, COLUMN_NAME, DIMINFO, SRID ) VALUES ( 'MY_TABLE', 'GEOM', MDSYS.SDO_DIM_ARRAY (MDSYS.SDO_DIM_ELEMENT('X', -7000, 300000, 0.001), MDSYS.SDO_DIM_ELEMENT('Y', 289000, 6290000, 0.001) ), 90112 ); /// load the data (import shp2sdo.exe ouput with sqlldr) CREATE INDEX MY_TABLE_GI ON VB_PAND(GEOM) INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS ('sdo_indx_dims=2 layer_gtype=MULTIPOLYGON') ; ************************************************************************************************ DISCLAIMER: Aan de informatie in deze e-mail en ieder aangehecht databestand kunnen geen rechten worden ontleend en de gemeente Aa en Hunze aanvaardt geen aansprakelijkheid voor schade als gevolg van onjuistheden en/of gedateerde informatie. Als u niet de bedoelde ontvanger bent wilt u dan dit bericht en ieder aangehecht databestand verwijderen en de afzender hiervan via e-mail op de hoogte stellen. ************************************************************************************************ Deze mail is gescand met McAfee Webshield en bevat geen virussen. Gemeente Aa en Hunze.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to