From thomas.brosset at gmail.com Wed Jul 1 03:50:30 2009 From: thomas.brosset at gmail.com (Thomas BROSSET) Date: Wed, 1 Jul 2009 09:50:30 +0200 Subject: [Featureserver] writing to shp layer Message-ID: <9f947db50907010050j23345e65qb1f9295cf2f904e1@mail.gmail.com> Hi everybody! I've got a problem to write data to my shape layer with featureServer. It works fine with the scribble layer defined by default. But i can't add features to my shp layer. The shape file works perfect with mapserver and i get the features with featureServer, but can't edit the data... any idea? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://featureserver.org/pipermail/featureserver/attachments/20090701/a253ca69/attachment.htm From crschmidt at metacarta.com Wed Jul 1 09:20:25 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed, 1 Jul 2009 09:20:25 -0400 Subject: [Featureserver] writing to shp layer In-Reply-To: <9f947db50907010050j23345e65qb1f9295cf2f904e1@mail.gmail.com> References: <9f947db50907010050j23345e65qb1f9295cf2f904e1@mail.gmail.com> Message-ID: <20090701132025.GJ21035@metacarta.com> On Wed, Jul 01, 2009 at 09:50:30AM +0200, Thomas BROSSET wrote: > Hi everybody! > I've got a problem to write data to my shape layer with featureServer. It > works fine with the scribble layer defined by default. But i can't add > features to my shp layer. The shape file works perfect with mapserver and i > get the features with featureServer, but can't edit the data... any idea? What version of OGR? Do you have a shapefile created first that you're appending do? (Do you *really* want ot use Shape, instead of PostGIS or some other format designed for editing?) OGR should *work* with writing shapefiles, but the support in FeatureServer is really geared around serving, not editing. Regards, -- Christopher Schmidt MetaCarta From eric.lemoine at camptocamp.com Thu Jul 9 08:50:12 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Thu, 9 Jul 2009 14:50:12 +0200 Subject: [Featureserver] OpenLayers+FeatureServer full transactional example In-Reply-To: <4A44C12B.2000404@mapgears.com> References: <4A3948CA.404@mapgears.com> <4A3BAC86.1010300@mapgears.com> <4A3F771C.8050403@mapgears.com> <4A3FA869.4080907@mapgears.com> <698156f30906230131k4a3d21ddh6040030f3138cd27@mail.gmail.com> <20090623132754.GK22033@metacarta.com> <1245764564.5298.51.camel@yves-laptop> <1245765068.21775802@192.168.1.70> <20090623140603.GM22033@metacarta.com> <4A44C12B.2000404@mapgears.com> Message-ID: On Friday, June 26, 2009, Alexandre Dube wrote: > Hi, > > Christopher Schmidt wrote: >> >> Note that you didn't mention "Try the MapFish Protocol" as I recommended >> in here. FS + MapFish servers should likely perform about the same -- >> the client side code is what you're looking for. (Also, I still >> recommend getting proxies out of the way for testing. Proxies are a >> different problem.) >> >> > > I finally got it working ! > > MapFish server is indeed very similar to FeatureServer. Using > Protocol.MapFish, with a minor change ('bbox' instead of 'box' > property), Right. We could easily have "bbox" as an alias to "box" in MapFish. We could also change the client code (Protocol.MapFish) so that "bbox" is used instead of "box", in this way we'll be closer to the FeatureServer interface. Alexandre, if you care about this, feel free to open a ticket in the MapFish trac, and I'll make a quick patch when I'm back from vac (the 15th of july). Thanks, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine at camptocamp.com http://www.camptocamp.com From adube at mapgears.com Mon Jul 13 09:55:12 2009 From: adube at mapgears.com (Alexandre Dube) Date: Mon, 13 Jul 2009 09:55:12 -0400 Subject: [Featureserver] OpenLayers+FeatureServer full transactional example In-Reply-To: References: <4A3948CA.404@mapgears.com> <4A3BAC86.1010300@mapgears.com> <4A3F771C.8050403@mapgears.com> <4A3FA869.4080907@mapgears.com> <698156f30906230131k4a3d21ddh6040030f3138cd27@mail.gmail.com> <20090623132754.GK22033@metacarta.com> <1245764564.5298.51.camel@yves-laptop> <1245765068.21775802@192.168.1.70> <20090623140603.GM22033@metacarta.com> <4A44C12B.2000404@mapgears.com> Message-ID: <4A5B3CC0.30006@mapgears.com> Hi, Eric Lemoine wrote: > > Right. We could easily have "bbox" as an alias to "box" in MapFish. We > could also change the client code (Protocol.MapFish) so that "bbox" is > used instead of "box", in this way we'll be closer to the > FeatureServer interface. Alexandre, if you care about this, feel free > to open a ticket in the MapFish trac, and I'll make a quick patch when > I'm back from vac (the 15th of july). > > Thanks, > Just came back from vacations. Here's the ticket (1). Regards, (1) http://trac.mapfish.org/trac/mapfish/ticket/496 -- Alexandre Dub? Mapgears www.mapgears.com From Witt.Sparks at nrel.gov Mon Jul 13 14:56:04 2009 From: Witt.Sparks at nrel.gov (Sparks, Witt) Date: Mon, 13 Jul 2009 12:56:04 -0600 Subject: [Featureserver] Feature server reading from Oracle Spatial as an OGR datasource Message-ID: I haven't been able to find an example of this. I'm using the following in my featureserver.cfg file, but this is really just a shot in the dark: [metadata] default_service=GeoJSON [us_alt_fuel_stations_e85] type=OGR dsn="OCI:user/password at DB_INSTANCE:stations" layer=us_alt_fuel_stations_e85 fid=id_number geometry=geo_location I have compiled OGR with OCI support; the following works: ogrinfo -ro OCI:user/password at DB_INSTANCE -sql "SELECT station_name from stations where fuel_type_code='HY'" I also know that my feature server install works, as I have been able to connect to a postGIS datasource. Thanks for any assistance! ______________________________________________________________________ Witt Sparks National Renewable Energy Laboratory Center for Transportation Technologies and Systems witt_sparks at nrel.gov 303-275-4494 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://featureserver.org/pipermail/featureserver/attachments/20090713/cdeeb9b3/attachment.htm From fs at peterrobins.co.uk Sat Jul 25 05:57:22 2009 From: fs at peterrobins.co.uk (Peter Robins) Date: Sat, 25 Jul 2009 10:57:22 +0100 Subject: [Featureserver] OpenLayers+FeatureServer full transactional example Message-ID: <200907251057.28783.fs@peterrobins.co.uk> afaics, OL http protocol will support crud with FS without much problem. 'C' and 'R' work as is; 'U' and 'D' require '/fid' at end of url string. At first, I thought I would add this by supplying a function to the protocol, but it struck me that all I have to do is add a url property to each feature as it's read in, which will then be used on any update/delete. So I have a featureadded listener which calls: featureAdded: function (e) { e.feature.url = baseUrl+'/'+e.feature.fid; } I'm using this with fixed and save strategies, and it all seems to work well. :-) From fs at peterrobins.co.uk Sat Jul 25 07:25:06 2009 From: fs at peterrobins.co.uk (Peter Robins) Date: Sat, 25 Jul 2009 12:25:06 +0100 Subject: [Featureserver] OpenLayers+FeatureServer full transactional example In-Reply-To: <200907251057.28783.fs@peterrobins.co.uk> References: <200907251057.28783.fs@peterrobins.co.uk> Message-ID: <200907251225.07441.fs@peterrobins.co.uk> On Saturday 25 Jul 2009, Peter Robins wrote: > featureAdded: function (e) { > e.feature.url = baseUrl+'/'+e.feature.fid; > } or better: e.feature.url = e.feature.layer.protocol.url+'/'+e.feature.fid; From eric.lemoine at camptocamp.com Sat Jul 25 08:14:35 2009 From: eric.lemoine at camptocamp.com (Eric Lemoine) Date: Sat, 25 Jul 2009 14:14:35 +0200 Subject: [Featureserver] OpenLayers+FeatureServer full transactional example In-Reply-To: <200907251057.28783.fs@peterrobins.co.uk> References: <200907251057.28783.fs@peterrobins.co.uk> Message-ID: Hi Peter It's when you want filtered queries that Protocol.HTTP isn't appropiate. The protocol class we have in MapFish (mapfish.Protocol.MapFish) provides better FS support (MapFish and FS share a similar protocol). Cheers, On Saturday, July 25, 2009, Peter Robins wrote: > afaics, OL http protocol will support crud with FS without much problem. 'C' > and 'R' work as is; 'U' and 'D' require '/fid' at end of url string. At > first, I thought I would add this by supplying a function to the protocol, > but it struck me that all I have to do is add a url property to each feature > as it's read in, which will then be used on any update/delete. > > So I have a featureadded listener which calls: > > ? ?featureAdded: function (e) { > ? ? ? ?e.feature.url = baseUrl+'/'+e.feature.fid; > ? ?} > > I'm using this with fixed and save strategies, and it all seems to work > well. :-) > _______________________________________________ > Featureserver mailing list > Featureserver at openlayers.org > http://featureserver.org/mailman/listinfo/featureserver > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : eric.lemoine at camptocamp.com http://www.camptocamp.com From Witt.Sparks at nrel.gov Mon Jul 27 16:31:19 2009 From: Witt.Sparks at nrel.gov (Sparks, Witt) Date: Mon, 27 Jul 2009 14:31:19 -0600 Subject: [Featureserver] Feature server reading from Oracle Spatial as an OGR datasource Message-ID: Since I didn't find a specific example on the web, I thought I'd share what I did to get this working. My first problem was that although I had re-compiled OGR to support oracle, I also needed to re-generate the python libraries. I found instructions on that at: http://pypi.python.org/pypi/GDAL/ The next challenge was getting the proper entry in my featureserver.cfg file, which turned out to be: [us_alt_fuel_stations_e85] type=OGR dsn=OCI:user/password at db_instance layer=WEB_PROD.STATIONS The trick for me was that although 'user' can see the tables in the web_prod schema in oracle, I had to explicitly specify schema.table. I believe you'll also need your LD_LIBRARY_PATH set to include wherever your oracle client is installed, and the TNS_ADMIN variable pointing to the location of your tnsnames file so that it can figure out how to connect to db_instance. ______________________________________________________________________ Witt Sparks National Renewable Energy Laboratory Center for Transportation Technologies and Systems witt_sparks at nrel.gov 303-275-4494 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://featureserver.org/pipermail/featureserver/attachments/20090727/c1465da2/attachment.htm From maplabs at light42.com Wed Jul 29 03:22:49 2009 From: maplabs at light42.com (Brian Hamlin) Date: Wed, 29 Jul 2009 00:22:49 -0700 Subject: [Featureserver] kml with [a b] points? Message-ID: <9EC92DFE-7C10-11DE-8D17-0003936901F0@light42.com> I generated a collection of SHP files with ogr2ogr and some SQL most of them seem fine so far but using a trunk featureserver running as wsgi, and adding 4 shp files as 4 layers ... a POINT layer in KML format http://hdt-vbox.local:8008/alameda_schools?format=kml is coming back with ... [-121.020, 37.121] ogrinfo on the shp looks ok at least superficially ??? I havent checked the KML spec carefully but those angle brackets look pretty out of place http://71.202.181.1/osgeo/aschools_shp.tgz -Brian From mpriour at kestrelcomputer.com Wed Jul 29 11:39:01 2009 From: mpriour at kestrelcomputer.com (Matt Priour) Date: Wed, 29 Jul 2009 10:39:01 -0500 Subject: [Featureserver] GeoRSS Errors Message-ID: <70B95F7BBBC3487C81B72DDE521EFAAF@MattPC> I'm using the trunk version of FeatureServer with a point shapefile data source. I get correct output in JSON, GeoJSON, & KML but an error when specifiying GeoRSS. GeoJSON output: {"crs": null, "type": "FeatureCollection", "features": [{"geometry": {"type": "Point", "coordinates": [[1373350.0, 6228020.0]]}, "type": "Feature", "id": 1, "properties": {"Deviation": -3, "TagId": 2, "OffDuty": 0, "Tidpunkt": "2007-05-10 00:00:00.000", "Y": 1373350, "X": 6228020, "Trafikplat": "HM"}}]} GeoRSS Error: An error occurred: list index out of range File "c:\ms4w\apps\featureserver\web_request\handlers.py", line 144, in wsgi accepts = accepts ) File "c:\ms4w\apps\featureserver\FeatureServer\Server.py", line 180, in dispatchRequest mime, data = request.encode(response) File "c:\ms4w\apps\featureserver\FeatureServer\Service\GeoRSS.py", line 28, in encode results = atom.encode(result) File "c:\ms4w\apps\featureserver\vectorformats\Formats\GeoRSS.py", line 37, in encode results.append( self.encode_feature(action)) File "c:\ms4w\apps\featureserver\vectorformats\Formats\GeoRSS.py", line 104, in encode_feature coords = "%s %s" % (feature.geometry['coordinates'][1], feature.geometry['coordinates'][0]) Thanks for any help Matt Priour Kestrel Computer Consulting From crschmidt at metacarta.com Wed Jul 29 11:59:53 2009 From: crschmidt at metacarta.com (Christopher Schmidt) Date: Wed, 29 Jul 2009 11:59:53 -0400 Subject: [Featureserver] GeoRSS Errors In-Reply-To: <70B95F7BBBC3487C81B72DDE521EFAAF@MattPC> References: <70B95F7BBBC3487C81B72DDE521EFAAF@MattPC> Message-ID: <20090729155949.GA19408@metacarta.com> On Wed, Jul 29, 2009 at 10:39:01AM -0500, Matt Priour wrote: > I'm using the trunk version of FeatureServer with a point shapefile data > source. > I get correct output in JSON, GeoJSON, & KML but an error when specifiying > GeoRSS. This GeoJSON is actually wrong as well. This problem was fixed in SVN about two hours ago, in r611. Please SVN up and try again. > GeoJSON output: > {"crs": null, "type": "FeatureCollection", > "features": [{"geometry": {"type": "Point", "coordinates": [[1373350.0, > 6228020.0]]}, > "type": "Feature", "id": 1, > "properties": > {"Deviation": -3, "TagId": 2, "OffDuty": 0, "Tidpunkt": "2007-05-10 > 00:00:00.000", "Y": 1373350, "X": 6228020, "Trafikplat": "HM"}}]} > > GeoRSS Error: > An error occurred: list index out of range > File "c:\ms4w\apps\featureserver\web_request\handlers.py", line 144, in > wsgi > accepts = accepts ) > File "c:\ms4w\apps\featureserver\FeatureServer\Server.py", line 180, in > dispatchRequest > mime, data = request.encode(response) > File "c:\ms4w\apps\featureserver\FeatureServer\Service\GeoRSS.py", line > 28, in encode > results = atom.encode(result) > File "c:\ms4w\apps\featureserver\vectorformats\Formats\GeoRSS.py", line > 37, in encode > results.append( self.encode_feature(action)) > File "c:\ms4w\apps\featureserver\vectorformats\Formats\GeoRSS.py", line > 104, in encode_feature > coords = "%s %s" % (feature.geometry['coordinates'][1], > feature.geometry['coordinates'][0]) > > > Thanks for any help > > Matt Priour > Kestrel Computer Consulting > > > _______________________________________________ > Featureserver mailing list > Featureserver at openlayers.org > http://featureserver.org/mailman/listinfo/featureserver -- Christopher Schmidt MetaCarta From mpriour at kestrelcomputer.com Wed Jul 29 12:11:51 2009 From: mpriour at kestrelcomputer.com (Matt Priour) Date: Wed, 29 Jul 2009 11:11:51 -0500 Subject: [Featureserver] GeoRSS Errors In-Reply-To: <20090729155949.GA19408@metacarta.com> References: <70B95F7BBBC3487C81B72DDE521EFAAF@MattPC> <20090729155949.GA19408@metacarta.com> Message-ID: <61172305BAA043E4A38928DC8C304B35@Lenovo> Works now! You can't get more responsive than that. Thanks so much Matt Priour Kestrel Computer Consulting -------------------------------------------------- From: "Christopher Schmidt" Sent: Wednesday, July 29, 2009 10:59 AM To: "Matt Priour" ; Cc: Subject: Re: [Featureserver] GeoRSS Errors > On Wed, Jul 29, 2009 at 10:39:01AM -0500, Matt Priour wrote: >> I'm using the trunk version of FeatureServer with a point shapefile data >> source. >> I get correct output in JSON, GeoJSON, & KML but an error when >> specifiying >> GeoRSS. > > This GeoJSON is actually wrong as well. This problem was fixed in SVN > about > two hours ago, in r611. Please SVN up and try again. > >> GeoJSON output: >> {"crs": null, "type": "FeatureCollection", >> "features": [{"geometry": {"type": "Point", "coordinates": [[1373350.0, >> 6228020.0]]}, >> "type": "Feature", "id": 1, >> "properties": >> {"Deviation": -3, "TagId": 2, "OffDuty": 0, "Tidpunkt": "2007-05-10 >> 00:00:00.000", "Y": 1373350, "X": 6228020, "Trafikplat": "HM"}}]} >> >> GeoRSS Error: >> An error occurred: list index out of range >> File "c:\ms4w\apps\featureserver\web_request\handlers.py", line 144, in >> wsgi >> accepts = accepts ) >> File "c:\ms4w\apps\featureserver\FeatureServer\Server.py", line 180, in >> dispatchRequest >> mime, data = request.encode(response) >> File "c:\ms4w\apps\featureserver\FeatureServer\Service\GeoRSS.py", line >> 28, in encode >> results = atom.encode(result) >> File "c:\ms4w\apps\featureserver\vectorformats\Formats\GeoRSS.py", line >> 37, in encode >> results.append( self.encode_feature(action)) >> File "c:\ms4w\apps\featureserver\vectorformats\Formats\GeoRSS.py", line >> 104, in encode_feature >> coords = "%s %s" % (feature.geometry['coordinates'][1], >> feature.geometry['coordinates'][0]) >> >> >> Thanks for any help >> >> Matt Priour >> Kestrel Computer Consulting >> >> >> _______________________________________________ >> Featureserver mailing list >> Featureserver at openlayers.org >> http://featureserver.org/mailman/listinfo/featureserver > > -- > Christopher Schmidt > MetaCarta > > From mpriour at kestrelcomputer.com Wed Jul 29 12:19:08 2009 From: mpriour at kestrelcomputer.com (Matt Priour) Date: Wed, 29 Jul 2009 11:19:08 -0500 Subject: [Featureserver] kml with [a b] points? In-Reply-To: <9EC92DFE-7C10-11DE-8D17-0003936901F0@light42.com> References: <9EC92DFE-7C10-11DE-8D17-0003936901F0@light42.com> Message-ID: <7E4C86013FC44BED80DFE33F572C5114@Lenovo> I think your problem will also be solved by updating to the latest trunk version. Apparently, there was an error that was wrapping point data in an extra array bracket, making it into a multipoint format when it is just a simple point. Matt Priour Kestrel Computer Consulting -------------------------------------------------- From: "Brian Hamlin" Sent: Wednesday, July 29, 2009 2:22 AM To: "featureserver" Subject: [Featureserver] kml with [a b] points? > I generated a collection of SHP files with ogr2ogr and some SQL > most of them seem fine so far > but using a trunk featureserver running as wsgi, and adding 4 shp files as > 4 layers > ... a POINT layer in KML format > http://hdt-vbox.local:8008/alameda_schools?format=kml > is coming back with > > ... > > [-121.020, 37.121] > > > ogrinfo on the shp looks ok at least superficially > ??? > > I havent checked the KML spec carefully but those angle brackets look > pretty out of place > > http://71.202.181.1/osgeo/aschools_shp.tgz > > > -Brian > > >