Hot answers tagged

13

I know this is an old question, but just in case anyone else is confused as I was. The important part is that you cannot create a layer from the http://geoserver/rest/layers endpoint. If you are looking to add a vector layer, it is done through the feature type resource: http://docs.geoserver.org/stable/en/user/rest/api/featuretypes.html A POST to: /...


9

You should have a look at the REST Help for GP Task To run the geoprocessing task, you need to provide an input. If your GP Service is Synchronous, then you need to call the Execute Operation. If your service is Asynchronous, then you need to call the SubmitJob Operation. Both of them take their input parameter in JSON Format. In the case of a Synchronous ...


7

It's a combination of two things really. 1) How much information can your server handle sending at a given time. 2) How much information can your client handle displaying. I can't answer "why" 1000. A good a guess as any, 1000 individual features drawn on a webmap would really tax the web browser and performance would suffer (a few years back). You can make ...


7

As @PolyGeo suggested, I am converting my comments into an answer. The answer is split into three parts to broadly reflect the three comments I made. Part 1 Roy Fielding's dissertation that described Representational State Transfer (REST) amongst other architectural styles Architectural Styles and the Design of Network-based Software Architectures was ...


6

I was able to do it using geoserver-manager. The code is: GeoServerRESTPublisher geoServerRESTPublisher = new GeoServerRESTPublisher("http://localhost:8090/geoserver", "admin", "geoserver"); geoServerRESTPublisher.publishGeoTIFF("myWS", "myTiff", "myTiff", new File("d:\\work\\myTiff.tif"), "EPSG:900913", GSResourceEncoder.ProjectionPolicy....


6

You can use the Identify Operation on the Mapservice to get the pixel values from the raster. Using the Identify Operation on a map service with Rasters, I can get both the Pixel value, as well as the stretched values:


5

What @Iant said. As the GeoServer RESTful interface docs says: GeoServer provides a RESTful interface through which clients can retrieve information about an instance and make configuration changes. Using the REST interface’s simple HTTP calls, clients can configure GeoServer without needing to use the Web Administration Interface. So ...


5

you have to go through geoserver's wms service: http://GEOSERVERBASE/geoserver/wms? service=WMS& version=1.1.1& request=GetMap& layers=jantrik:Storm_Mains& styles=&format=image/png& TRANSPARENT=TRUE& srs=EPSG:2000& bbox=11879566.92588,7000626.9713143,11880134.841974,7001041.8162735& ...


5

You cannot directly access the tiles without circumventing the T&C of google's API. If you want the map as an image you can do that with Google Maps Static API.


5

Maybe you can try this after creating the workspace: curl -u admin:geoserver -v -XPOST -H 'Content-Type: application/xml' \ -d '<coverageStore><name>int_dec</name><workspace>restProba</workspace> <enabled>true</enabled></coverageStore>' \ http://localhost:8080/geoserver/rest/workspaces/...


5

Try this: curl -v -u admin:geoserver -XDELETE http://localhost:8080/geoserver/rest/my_ws/coveragestores/my_cover?recurse=true You have a space between -X and DELETE Example can be seen at the REST API Docs curl -v -u admin:geoserver -XDELETE "http://localhost:8080/geoserver/rest/workspaces/topp/coveragestores/polyphemus-v1/coverages/NO2/index/granules....


4

Unless your app is written in Java then the REST approach is the most elegant as it can be coded in any language that has an HTTP lib (all of them). Any solution using selenium or something similar should be an absolute last resort, changes to the REST API will likely remain backward compatible so you can upgrade GeoServer with confidence, the UI will ...


4

You'll be able to in 10.1 SP1. When you run a geoprocessing tool in Python, its return value is a result object. There will be a new arcpy.CreateGPSDraft function what accepts these result objects and from there the workflow from Python will be exactly the same as it is with map services now.


4

You can now Cancel jobs and return Z and M as of ArcGIS REST API 10.1 Submit GP Job (now with option to returnZ and returnM) Cancel GP Job


4

You don't have to use cURL. You can use anything that can interact with the HTTP protocol. This includes your web browser, Linux shell (or PowerShell in Windows), PHP, Java etc. If you want to use Python you will probably want to download the Requests library so make things easier because, while the standard library can handle REST requests, it is a pain. ...


4

Turns out that ESRI just added this feature, but only for users of ArcGis server - the public server will have it turned off. The feature is called ExportTiles and it has been introduced in 10.2.1 for REST API: It'll export things into ArcGis's .Tpk or bundled image formats.


4

Regarding your question as to whether you can edit a feature layer using the REST API, the answer is yes. See the Apply Edits section of the REST API for documentation on how do this this. However, if it's only the status of the alarms which is changing every 15 minutes, you could make the change purely within the web map (without needing to change the ...


4

I'm successfully using this method to obtain a token: def get_token(): # Retrieve a token from ArcGIS Online to enable access to private services token_params = { 'client_id': "your_client_id", 'client_secret': "your_client_secret", 'grant_type': "client_credentials" } request = requests.get('https://www.arcgis.com/...


4

The JSON returned from that URL does not look like it conforms to any standard format. Any system that could map from that URL would have to know it was an array, with an array of "weatherStations" and each of those elements had an array of "sensorValues" and in each of those is eventually a measurement and a description of what that measurement meant. ...


4

Is it possible to do a GetFeatureInfo request using WMTS? It depends on what is supported by your service implementation, but in theory it is possible, by which I mean the OpenGIS® Web Map Tile Service Implementation Standard (OGC 07-057r7) defines such an operation: 7.3.2 GetFeatureInfo operation (optional in procedure oriented architectural style) ...


4

Editing ArcGIS Feature Service layers is not possible in any current QGIS version (as of August 2018).


3

I think GeoMajas is a good choice. For routing purposes I want to introduce you Graphhopper. It's still a young project, but it's java, it's incredibly fast and there are ready to use applications to route either on a web server or on the mobile device itself based on openstreetmap data. So if you have no problems to use openstreetmap and want to route on a ...


3

attributes: The feature attributes. It is a JSON object that contains a dictionary of name-value pairs. The names are the feature field names. The values are the field values and they can be any of the standard JSON types - string, number and boolean. Note that date values are encoded as numbers. The number represents the number of milliseconds since epoch (...


3

To check if the service is secured from the GIS Tier, you can use the ArcGIS for Server Admin API. Query the REST end point is this http://yourserver:6080/arcgis/admin/services/yourservice.MapServer/permissions If the REST end point returned "esriEveryone", it means it is public. Else it will return the permitted Roles or Group who can access this service....


3

To get json (or geojson) from PostGIS there is the function ST_geojson() which will return a geometric object in geojson form.


3

From ESRI Help: Maximum number of records returned by the server: Clients, such as the ArcGIS web APIs, can perform query operations to return specific information, or records, from a map service. This property specifies how many records can be returned by the server to a client for any given query operation. Specifying a large number of records to be ...


3

This service does what you describe in your original question - Given x/y coordinates of one city, it returns a JSON that lists only cities (not facilities) that are nearby the specified city, within a given radius (e.g. 100km) http://www.geobytes.com/get-nearby-cities-api/ As for an example - this link http://gd.geobytes.com/GetNearbyCities?callback=?&...


3

Ok, I figured out how to do this. As Stefan suggested, I had to add a couple of parameters to the URL: geometry (value = e.g. 639739.5,7598259.3) geometryType (value = esriGeometryPoint) spatialRel (value = esriSpatialRelWithin) Here is an example call: http://LocalArcGisServer.local.com:6080/arcgis/rest/services/SW/SW2/FeatureServer/2/query?f=...


3

We use python requests library to make HTTPS post calls to arcgis online and to arcgis server. you can use urllib2, but we really like using requests. After you have that, these are the params we use to pass to the endpoint. # some params to pass to the function below username = 'your_arcgis_online_username' password = 'your_arcgis_online_password' url = '...


3

I have a REST example that works on GWC, so I'll set it up so it's shared: https://gist.github.com/alexgleith/c39c3f520102c30e4dec Here's the meaty bits: url = baseURL + layer + '.json' request = urllib2.Request(url) base64string = base64.encodestring('%s:%s' % (un, pw)).replace('\n', '') request.add_header("Authorization", "Basic %s" % base64string) ...


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