I'm trying to render an ArcGIS WFS service within QGIS. Through no fault of QGIS, the service is failing because of the 5th BBOX parameter (urn:ogc:def:crs:EPSG::4326):
https://canttouchthis/arcgis/services/CALIX_TEST/CALIX_ANNOTATIONS/MapServer/WFSServer?SERVICE=WFS&REQUEST=GetFeature&VERSION=2.0.0&TYPENAMES=CALIX_TEST_CALIX_ANNOTATIONS:polygons&SRSNAME=urn:ogc:def:crs:EPSG::4326&BBOX=4324959.29130463115870953,-12827075.77402532286942005,4325046.08483351208269596,-12826893.6371572520583868,urn:ogc:def:crs:EPSG::4326 - server replied: Bad Request
When I remove ,urn:ogc:def:crs:EPSG::4326 it works fine -- ESRI WFS isn't equipped to deal with it:
<![CDATA[
KVP parser : parameter 'bbox' '4324959.29130463115870953,-12827075.77402532286942005,4325046.08483351208269596,-12826893.6371572520583868,urn:ogc:def:crs:EPSG::432' not recognized.
]]>
Once I remove the 5th parameter I get the desired feature data.
QUESTION: Can QGIS be configured to NOT provide the srs in the bbox?
ANSWER: Supply a filter (e.g. 1=1).
At this time, QGIS cannot be configured to suppress the 5th BBOX parameter but if you supply a dummy filter (e.g. 1=1) it forces QGIS to use a POST instead of a GET. This will eliminate the incompatible BBOX allowing you to view ESRI features within QGIS via WFS services.
Related
I'm planning a climbing trip and I wanted to retrieve the climbing locations from a leaflet map.
I thought I could use chromedriver and selenium to get the information I wanted but I'm having difficulty scanning through all markers since I can't understand where all the informations are stored.
Could someone guide me through how I could get the information? (also without using selenium)
The map in question is: https://www.climbingsardinia.com/topos/maps/
Thank you in advance.
in that page you will see a global variable called cttm_markers, it contains all markers informations and relative coordinates.
For example, cttm_markers[0][[0].additionalData.title evaluates "M.te Arci – Trebina Longa".Further, cttm_markers[0][[0]._latlng is an object {lat,lng} that contains coordinates.
Try to open console and paste this: JSON.stringify(cttm_markers[0].map(c=>({title:c.additionalData.title,latlng:c._latlng}))), it will print a json.
One way to do it is to get some information on one of the markers and use this to search the request reponses made by the page (you can do this in the debug tools, usually opened with F12). One of the markers for example reveals the location "Grighini". The base request redirects to (in my case) https://www.climbingsardinia.com/topos/maps/?doing_wp_cron=1651158093.0027918815612792968750
Searching the response, reveals that in line 1908 there's the string "Grighini". This line contains a serialized JSON array, containing the markers.
I'd like to export the boundaries (perimeter) of a place. For instance, consider the boundaries of the University of Illinois at Chicago at this link.
I see it's pretty easy to export an OSM file. But how can I export only that red line (perimeter)?
I don't need a script to do that, even a manual solution would be fine. I tried to navigate the UI for quite a time, but I couldn't find a way.
My ultimate goal is to convert the boundaries to a GeoJson.
You can use the Overpass API for this.
Go to https://overpass-turbo.eu and enter the following script:
[out:json][timeout:25];
way(210649421);
out geom;
The way-Id was taken from your link.
Then click on Run.
Afterwards, you can switch to the Data tab in the top right and copy the JSON for this area.
Alternatively, you can also use Export -> "raw data directly from Overpass API" to directly download a JSON payload, bypassing the browser output. For GeoJSON output, use Export -> "download/copy as GeoJSON" instead.
I'd like to split a feature into two features. This seems like it should be simple > I selected the feature > Used the split feature tool > selected outside the polygon on one side, and outside the polygon on the other side > Right clicked. Then it gave me this error.
"No features were split: If there are selected features, the split tool only applies to those. I you would like to split all features under the split line, clear the selection."
If I de-select the feature, I get the following error message.
"No feature split done: The geometry is invalid. Please repair before trying to split it.
The question is generic, you do not specify the source of the geometries (shapefile, postgis, spatialite...), wether exists a spatial index (a corrupt spatial index may cause a similar issue)...
According to the error message you are receiving, though, the geometry you are trying to split seems to be invalid.
Try the "Check validity" plugin or "Fix geometry" process (save a copy of your data before to apply them). If QGis is unable to automatically correct the geometry, search for autointersection ("butterfly" shape) or duplicate nodes.
You may refer to: https://postgis.net/docs/using_postgis_dbmanagement.html#OGC_Validity
for a definition of what a valid geometry is.
For learning porpoises I am trying to run the default map viewer set up and show the POIs stored in the orion public instance (orion.lab.fi-ware.org:1026).. but it does not work at all.
Following screenshots with the default provided configurations. It should show a bunch of Santander POIs if I understood well.
1.-Wired mashups schema:
2.- NGSI Source default settings:
3.- NGSI entity to POI default settings:
4.- Map viewer default settings:
5.- Map viewer result (No results at all :(( ):
Everything looks pretty straight forward but nothing is shown. Without understanding why it is not working I can not moving forward and work in my own implementation.
thanks in advance.
It looks to me like you have not obtained an authorization token (or you are not showing it in your question?). Without one you are not able to retrieve information from orion.lab.fi-ware.org.
One way to get a token is running this python script:
https://github.com/telefonicaid/fiware-figway/blob/master/python/get_token.py
Of course, you do need a FIWARE Lab account to get it.
The problem seems to be in the configuration of the "NGSI entity to POI". The Node, AMMS and Regulators entities provide their coordinates using the Latitud (latitude) and Longitud (longitude) attributes.
The final value for the "Coordinate attribute" setting should be: Latitud, Longitud
I would like to get the distance between 2 markers but not as a direct line, more as a real path like it goes in this plugin -
https://github.com/perliedman/leaflet-routing-machine
I didn't find anything about using this plugin in the directive: angular-leaflet-directive,
if someone can guide how to make it done, it would be very appreciated.
thanks!
I am not sure if you specifically want to use leaflet routing machine to get distances... but if you do, maybe this info can get you started:
Set up a route on your map based on this example by the leaflet routing machine author:
https://www.liedman.net/leaflet-routing-machine/tutorials/interaction/
If you look at that example, there is an array called routes. Each route has some basic statistics associated with it, generated by OSRM. You can pull them by calling for example:
routes[0].summary.totalDistance
or
routes[0].summary.totalTime
Then you can do whatever you want with them. If you dig through the code on GitHub you can see more about how the data are moved around within the plugin and why the array is arranged that way:
https://unpkg.com/leaflet-routing-machine#3.2.12/dist/leaflet-routing-machine.js