Hot answers tagged

11

That map service is a ArcGIS Server Dynamic Map service which typically only returns images and specific query results, much like a WMS. Some ArcGIS Server image services allow for data download, but this isn't one of those. You can get the information you're looking for through the query operation, but it will take multiple queries as the max record ...


9

Here's a link to Esri's doc on JSON geometry objects. From that page: The REST API supports 4 geometry types - points, polylines, polygons and envelopes. Sounds like multi-polygons are not supported. See below. You can create multi-polygons by adding additional rings. There's nothing explicit about interior v. exterior rings. I'm curious so I'm going ...


9

I finally found what I was looking for: a proper ArcGIS Server web endpoint that I could use to generate tokens! The call is this: GET http://<arcgisserver_host:port>/arcgis/tokens?request=getToken&username=<usr>&password=<usr>&expiration=<token_lifespan> which gives back the token into the HTTP response body, and one ...


8

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 fairly easy with urllib2. Say you've got a gigantic url like this: http://myserver/path/to/a/thing?json1={"data":[1,2,3,4,5]}&json2={"data":[1,2,3,4,5]}&json3={"data":[1,2,3,4,5]} All you need to do is take the query (everything after the ?) and jam it in the data argument to urlopen. import urllib2 import urlparse # GET return_data = ...


7

Please have a look at How ArcGIS Server Security works. Basically, you will need to make users and groups, and give a particular User rights over certain services. Once you have done that, then you need to use Token based security in your JavaScript Application. What this means is that, you ask the User for their UserName & password. That is sent to ...


6

If you use Fiddler when you are firing a token authentication you can see the response (403 Forbidden etc). I used this when first setup FME Server with security - this uses the same Token method and is not unique to ArcGIS REST but REST with security. It is likely to be either software security issues or the webserver refusing the users request. This ...


5

Use esri.request() to hit each layer's REST endpoint to get info about fields. Here's a simple example: <html> <head> <script type="text/javascript">var djConfig = {parseOnLoad: true};</script> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4"></script> <script ...


5

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

I just uploaded a script uploads a CSV and publishes as a github-gist. You may want to change the input as right now its setup to run at command line and enter parameters manually when you execute. The credit goes to a co-worker of mine who shared this with me. I haven't extensively tested it, but it worked for the case I was trying. Note that it does rely ...


4

You have not stated what version of ArcGIS Server you are running. If you are on 9.3.1 your stuck with the WKIDs that REST supports: Projected Geographic The other option (which I have done before) is submit a WKID request to Esri Support. For me, we sent them the projection file and they created a NIM, and at the next version it was included. I know ...


4

I used Fiddler and now I know the service that you added is from: http://gis.ventura.org/ArcGIS/rest/services/MSDs/Basemap/MapServer There are a few other tools like Fiddler that captures HTTP traffic (request and responses from client to server) and logs it for the user to review. If you really need to hide your url's, use the HTTPS protocol. Using HTTPS ...


4

The only time I have had problems with relationship classes that exist in SDE not being automatically published in a map service was because there is a problem with permissions on the account I was publishing with to see the related table in SDE. How are you adding related feature classes/ tables to the .mxd? Is it the same user/version as the key feature ...


4

I get no results when I search the GeoServices REST Specification Version 1.0 whitepaper for "transformation". It looks like Esri exposed IGeometry.Project but not IGeometry5.ProjectEx5 (for REST). Implementing this would be complicated. AFAIK there are no WkID's for geotransformations. IGeoTransformation.Name is not an industry standard (?) so using ...


4

If you set transparency only on one layer in your ArcMap file you should save it as MSD () and NOT mxd and in javascript init ArcGISDynamicMapServiceLayer with imageParameters.format = "png32"; Here are some links to similair posts on ESRI forum: http://forums.arcgis.com/threads/27413-layer-transparency-not-working ...


4

There is a C++ SDK of FileGDB API to handle FileGDB, and this may help you. You can build a web service wrapping local operations of FileGDB API, make it RESTful to be consumed by Javascript API.


4

I solved this problem by publishing a gp service with "Add Field" toolbox.To invoked this gp service via javascript api.As shown :


4

It looks like either the Query or the Identify tasks will do the trick. I successfully adapted this sample to prototype this functionality using the ArcGIS JavaScript API: var qt1="http://localhost:6080/arcgis/rest/services/simple_ny_outline/MapServer/0" var queryTask = new esri.tasks.QueryTask(qt1); var query = new esri.tasks.Query(); ...


4

What you need to do, is to query your ArcGIS Server REST Endpoint via JSON, and then Parse the Result. Let us take the example of the ArcGIS Online Sample Server that you are using. You normally use http://sampleserver3.arcgisonline.com/ArcGIS/rest/services as the url in your browser. But if you append an ?f=json at the end of it, the server responds in ...


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 couldn't find this syntax listed anywhere so I'm sharing it in case it helps someone else. import urllib, urllib2, json serviceEndPoint = "http://<server>/ArcGIS/rest/services/<name>/FeatureServer/<ID>/" #Query the server for the objects to be deleted params = urllib.urlencode({'where': <whereclause>, 'f': 'json', ...


4

You can use my restapi module. It is very simple to do these kinds of things: import restapi import os url = 'http://gis.mda.state.mn.us/arcgis/rest/services/MN_Agriculture_EAB_Detection/MapServer' # reference map service mapService = restapi.MapService(url) # reference quarantine county layer so we can get a single feature quarantines = ...


3

Representational State Transfer (REST) is based on the HTTP protocol and it uses HTTP verbs (GET, POST, DELETE, etc) to transfer representations of resources. The World Wide Web itself is actually a good example of a REST architecture in that you make a request for a resource (a web page) and the system returns a representation of that resource (HTML). As ...


3

Use the geometry from your first query as the geometry parameter in your second query. I know you said flex, but here's a JavaScript sample showing this: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/query_bypoly.html If there's a flex sample showing how to do this, it's probably here: ...


3

I believe in ArcGIS Server 10.1 there is feature-level ownership-based access control. See this video for a demo (starts at about 40 minutes in): http://video.esri.com/watch/1175/building-web-editing-applications-with-arcgis-10.1-for-server


3

This is what a POST request to applyEdits looks like: In the headers: Content-type:application/x-www-form-urlencoded POST body: ...


3

with the rest interface it doesn't understand time in human form. It has to be in milliseconds, there's more information in the help section in your rest catalog, but specifically: time Description: The time instant or the time extent to query. Time instant Syntax: time= Example: time=1199145600000 (1 Jan 2008 00:00:00 GMT) Time extent Syntax: ...


3

You need to look at the documentation for the GeoProcessor. Basically, you will create a new geoprocessor object like this: gp = new esri.tasks.Geoprocessor("http://YourServer/ArcGIS/rest/services/foo/GPServer/bar"); Then you will need to create a parameter object, with the two required parameters. for this, I'm assuming you will need to take the user's ...


3

In addition to my comment, the main issue is converting the EsriJSON to GeoJSON for your data. There have been a handful of projects that can do this, but Esri recently released their esri-leaflet library that can interact directly with ArcGIS Server services. For your vector data, you can do this manually by trying this esri util to convert EsriJSON to ...



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