Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Hot answers tagged

48

This website describes the differences between WMS, WFS, and WCS fairly clearly. WMS is probably the best known of these three standards due to its widespread use by map servers to deliver map images. In contrast to the images served by WMS, WFS communicates geographic feature information. The WFS web service allows features to be queried, ...


25

I suppose you have been reading this http://docs.geoserver.org/latest/en/user/tutorials/cql/cql_tutorial.html Here comes some sample requests which are sending queries for the demo server of Boundless but which should work similarly with your own server if you have demo layer topp:states installed. Select where STATE_NAME is Illinois http://demo.opengeo....


23

Take a look at my answer on this post. Make sure your featureNS value is in the "Edit Workspace Page under Namespace URI" in your GEOSERVER. Do not use something as generic as "http://postgis.org". Use something like "http://yourdomain/application/catalogLayer" or something unique like that. You can make this URI up, just make it unique. You ...


17

There is OWSLib which should provide exactly what you need. OWSLib is a Python package for client programming with Open Geospatial Consortium (OGC) web service (hence OWS) interface standards, and their related content models. OWSLib provides a common API for accessing service metadata and wrappers for numerous OGC Web Service interfaces. ...


16

The reasons why it is so slow is you retrieve megabytes of data doing your WFS request. To confirm, open Firebug (Firefox addon debugger) or Chrome and look into Net(work) panel. You will see it's too huge. This data takes time to be process (your "page is unresponsive" syndrom) browser capabilities: you never display more than one thousand of feature in a ...


14

While you can set up a proxy with your webserver, there is an easier way. First, enable JSONP in GeoServer. Then form your data requests like this: var owsrootUrl = 'https://<GEOSERVER URL - CHANGEME>/geoserver/ows'; var defaultParameters = { service : 'WFS', version : '2.0', request : 'GetFeature', typeName : '<WORKSPACE:...


13

Fiddler allow you to capture HTTP traffic acting as a proxy between you and network. So to capture WMS/WFS requests from any software I believe you have just to run Fiddler as usual. The same way you have done it with MapInfo - no additional configuring is required. PS I have tested it with ArcGIS Server - successfully capturing REST traffic. EDIT1: You ...


13

To learn more about the Rest-Module of geoserver i can recommend you this website: http://geoserver.geo-solutions.it/edu/en/rest/using_rest.html but I guess that you just want to load a WFS-Layer into your Leaflet-map, so you can have a look at this post: http://blog.georepublic.info/2012/leaflet-example-with-wfs-t/ Here the Requests for the WFS-layer are ...


12

You can set the parameter resultType to "hits" and you will get the number of features in the query similar to the count() function in SQL. HTTP Get request example: http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=topp:states&version=1.1.0&resultType=hits HTTP Post request example with a filter: <wfs:GetFeature service="WFS"...


11

Assuming your are using OpenLayers.Protocol.WFS, then you have something like this and you can provide a callback when you call the read operation on the protocol: The call back has an OpenLayers.Protocol.Response object. This object has an error property that will let you know of any errors. var protocol = new OpenLayers.Protocol.WFS({ version:...


11

I'm not sure why you are excluding services like Google Maps, especially since your expected traffic not that high (Google starts charging after 25,000 map views (your map views will be much lower than 10,000): https://developers.google.com/maps/faq#usage_pricing). What you basically need is two things: Someone to provide you with the Web slippy map. This ...


10

Take a look at this code example: var adresspt_wfs = new OpenLayers.Layer.Vector("Address points WFS", { strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy], protocol: new OpenLayers.Protocol.WFS({ url: "http://localhost:8080/geoserver/wfs", featurePrefix: "XXXX" //<-- GeoServer workspace name featureType: "RAILWAY",//<-- layer ...


9

I'm going to make the following assumptions: url = http://insert.your.url.com/path (which will be wrong) your not using any library, i.e. no jQuery, no AJAX you're interested in the built in XMLHttpRequest() object you would like to handle asynchronous requests (instead of synchronous) you can replace the error / success handler with something else you wan'...


9

Your feature ID looks suspiciously random as in randomly generated by Geoserver. The reason for that is that Geoserver (GeoTools actually) cannot pick a unique identifier from the datastore. This document, though vague, explains what GeoTools consider a fid: http://old.geotools.org/What-is-a-FID_63486.html Solution: if you are using postgis define a ...


9

GeoServer has its own convention for JSONP callbacks, which is described here (coudn't find it mentioned in the official docs). So I quickly hacked a jsfiddle showing how you can use it with jQuery, just remember to set the url, workspace and layers so that they point to your geoserver.


9

It looks like I found your holy grail! SharpMap has a WFS implementation. Code here: https://github.com/SharpMap/SharpMap/blob/master/SharpMap/Data/Providers/WFSClient.cs Main web page here: https://github.com/SharpMap/SharpMap. If I were you, I'd use that as much as I could. It'll save you doing all the tedious implementation stuff...


9

Ref: http://leafletjs.com/reference.html#icon pointToLayer: function(feature, latlng) { var smallIcon = L.icon({ iconSize: [27, 27], iconAnchor: [13, 27], popupAnchor: [1, -24], iconUrl: 'leaflet/icons/' + feature.properties.pcp + '.png' }); return L.marker(...


9

The WFS BBOX works in "bbox vs bbox" mode for performance reasons, if you want the more accurate geometry intersection you can use a OGC Filter or CQL filter with the intersection operator. As for the other question, WFS won't consider SLD, only WMS does. The SLD can have filters in rules, including spatial ones (uncommon but not impossible) but mind, they ...


8

You can do a post request in OpenLayers like this: var postData = ""; //insert your data to post here var request = new OpenLayers.Request.POST({ url: "http://host/path", data: postData, headers: { "Content-Type": "text/xml;charset=utf-8" }, callback: function (response) { //read the response from GeoServer var ...


8

After struggling with it for about 6 hours I was able to get it to work. Here is the script I used to solve the problem: lyrstands = new OpenLayers.Layer.Vector("Stands 1stQ 2012", { strategies: [new OpenLayers.Strategy.BBOX()], eventListeners: { 'loadend': function (evt) {//THE LOADEND EVENT LISTENER - WHEN THE LAYER IS DONE ...


8

Keep in mind that WFS is already a service which returns its data format (mixture of OGC standards). GeoJSON and KML are only a data format, you'll have to build the service to return the data. So included with WFS are already advanced filtering capabilities such as temporal filters, spatial filters (intersect, touches, overlaps...) as well as logical and ...


8

Try with intersects: <ogc:Intersects> ... </ogc:Intersects>


8

WMS and WFS have different behavior. In WMS the SRS and BBOX parameters are mandatory and the SRS defines both the output projection, and the BBOX has to be expressed in the SRS coordinates. In WFS instead they are both optional, and not linked to each other. srsName defines the desired output projection, so it will cause reprojection, while the BBOX is, ...


7

You can use the python urllib library to call a WMS directly and write the response out to a file. There is a decent example of using urllib in this answer. Just replace the URL with one for a WMS, e.g. http://some.wms.service?request=GetMap&VERSION=1.1.1&BBOX=141.00,-29.00,141.80,-28.40&SRS=EPSG:4326&LAYERS=LANDSAT_MOSAIC&WIDTH=800&...


7

I know each web service provides different features. But, If I use WMS service for my temporal data to get map images by performing some kind of aggregation in database(as it is temporal visualization), then the my application will get slow on some devices like mobile phones/tablets as it may take lot of time to fetch images." I disagree with this statement ...


7

You can serve html files in GeoServer by placing them in the www subdirectory in your GeoServer's data directory. data_directory/ global.xml logging.xml wms.xml wfs.xml wcs.xml data/ demo/ geosearch/ gwc/ layergroups/ palettes/ plugIns/ security/ styles/ templates/ user_projections/ workspaces www/ You ...


7

To expand on my earlier comment for the benefit of Janne and other readers. When you use OpenLayers to make a WFS (and WFS-T) request you need to be aware of the same-origin policy, this is a clever way to prevent unscrupulous web sites from running malicious javascript exploits on your web browser. Basically what it says is that if a javascript app wants ...


7

The GeoTools library supports WFS-T. By using the class org.geotools.data.wfs.WFSDataStoreFactory you can connect to a WFS service. A transaction can be created using any class that implements the interface org.geotools.data.Transaction, for instance, the class org.geotools.data.DefaultTransaction. GeoTools has also classes that will allow you to work ...


7

I got it to work using Geoserver 2.3 and Leaflet with WFS 1.0.0 here. When I changed to version 1.1.0 and 2.0.0 it returned the same json object as 1.0.0 but neither rendered on the map. Not sure why and it's a bit beyond me. Here's what I'm using: var rootUrl = 'http://tomcat.capecodgis.com/geoserver/capecodgis/ows'; var defaultParameters = { ...


7

WFS version 1.0.0 supports officially only the default SRS/CRS both for input and output. However, many WFS server brands have backported the srsName parameter that came with WFS 1.1.0 at least for output. With some WFS servers srsName may work also for defining the input geometry but let's assume that it is not possible and concentrate on WFS 1.1.0. As far ...


Only top voted, non community-wiki answers of a minimum length are eligible