|
POST
|
I've tried using Project Raster with an Output Extent (in 10.3) and it works as expected, clipping the result to the output extent. Note that the coordinates of the extent must be in the INPUT coordinate system, not that of the output projection. So if, for example, you are using "Same as Display", you'd probably need to ensure that the dataframe's spatial reference was equivalent to that of your input raster. Could this be the cause of your issue??
... View more
04-10-2015
01:53 AM
|
1
|
2
|
3358
|
|
POST
|
My apologies. I've investigated further and realised that the symptoms only arise with a very specific scenario that I only hit on accidentally and that it is easy enough to step around. My script uses arcpy.mapping.MapDocument("CURRENT"), and I had been outputting the feature class, rather than the feature layer. A new layer therefore got added to the ArcMap TOC based on the feature class, while in memory, a feature layer of the same name was still hanging around. When I subsequently ran the Apply Symbology to Layer tool in the foreground, I guess it applied the symbology to the in memory layer, while if I ran it in the background, it would apply it to the ArcMap TOC layer. An odd one! If you have any interest in replicating it, you can do so with this script. import arcpy # ********************************************************************************************************** # Remove this next line, and you can apply symbology afterwards, whether foreground or background processing # Leave it, on the other hand, and you can only apply symbology afterwards when in background processing mxd = arcpy.mapping.MapDocument("CURRENT") # ********************************************************************************************************** fcPath = arcpy.env.scratchGDB + r"\testing" arcpy.MakeFeatureLayer_management(fcPath, "testing") arcpy.SetParameter(0,fcPath) Thanks for your help, David.
... View more
02-25-2015
01:57 PM
|
1
|
0
|
732
|
|
POST
|
I'm using 10.2.2 - ArcMap. If I run the Apply Symbology to Layer tool in ArcMap, with background geoprocessing enabled, it works as expected. However, disable background geoprocessing and while the tool appears to run without error, the layer's symbology is not updated. Is this expected behaviour? Or a bug? It means that if I have a script tool that must run in the foreground (e.g. because it addresses the current map document) then symbology cannot be applied to the output layer.
... View more
02-25-2015
09:03 AM
|
0
|
2
|
4244
|
|
POST
|
Is it possible to add an existing ArcGIS Desktop tool (e.g. Zoom In Tool) to a python add-in toolbar? I can add it via the UI, such that it gets saved in the map document or template, but I can't see a way to add it such that when the user first installs the add-in, the tools will already be on the toolbar.
... View more
02-13-2015
05:02 AM
|
1
|
1
|
4193
|
|
POST
|
Can anyone tell me how to activate a python add-in tool? When I say "activate", I mean make it the currently active tool for the map. The reason I'm wanting to do this is so that I can have some code run every time the user clicks on a tool, but then immediately allow them to start drawing on the map. At present, I can only achieve this by having them first click on a button (which will appear to the user to be doing nothing), and then click on the tool so that they can start drawing.
... View more
02-13-2015
04:46 AM
|
0
|
2
|
4763
|
|
POST
|
Has anyone identified a way to have a python add-in tool maintain its cursor when the mouse stops moving? I'm using 10.2.2 and if I set a tool to have self.cursor = 3, I will get a cross-hair for as long as my mouse moves over the map. However, when it stops, the cursor reverts to the default pointer. The user can be trying to accurately place the cross-hair when suddenly it changes to a pointer.
... View more
02-13-2015
04:41 AM
|
0
|
0
|
3906
|
|
POST
|
Your assumption seems right to me - that you need to capture touch events at the level of the map. To me, this makes good logical sense, in that you can't tap a layer as such - only the map as a whole. The current state of the app (e.g. whether a "select graphic" tool is enabled) will determine whether a particular layer should respond. If your app is relatively simple, you could drop all your logic in the MapView's OnSingleTapListener (or other listener for different touch events). Alternatively, you could extend GraphicsLayer or FeatureLayer and drop the logic for each type of layer in your app into a new method (e.g. OnSingleTap?). The MapView's OnSingleTapListener could then call each layer's OnSingleTap method, and depending on your layer's current state (which might depend, say, on which tools or options are enabled), each layer could work out what it needs to do (if anything) in respond to the tap. A GraphicsLayer can use the following methods to get the graphic(s) nearest to a tapped point: getGraphicIDs (has various overrides that allow you to specify tolerance and max number of results returned) getGraphic(int uid) - allows you to get the actual instance of a Graphic, given any of the IDs returned above.
... View more
12-08-2014
08:23 AM
|
0
|
0
|
606
|
|
POST
|
More of a bug report than a question, but when a user zooms on a MapView by double-tapping-then-dragging, the OnZoomListener does not appear to receive notification of the zoom event. Something to be wary of...
... View more
12-05-2014
03:38 AM
|
0
|
0
|
2711
|
|
POST
|
I'm only guessing now, but... 1/ How are you instantiating your FeatureLayer? From the GeodatabaseFeatureTable? 2/ Do the FeatureLayer, GeodatabaseFeatureTable (and MapView?) objects all share the same scope? Sent from Samsung Mobile
... View more
12-04-2014
01:13 AM
|
0
|
1
|
1551
|
|
POST
|
Looking at your code, I doubt if the spatial reference is a real issue. After all, the geometry is being derived from the map. Perhaps instead you could try an alternative approach that would also allow you to inspect the query results? Use queryFeatures (with your QueryParameters) on your GeodatabaseFeatureTable and inspect the results in the callback. If you are getting results, you could then select them individually, by iterating them and using Featurelayer.selectFeature on each. (I've not tried it but it looks like a viable approach! ) David Sent from Samsung Mobile
... View more
12-02-2014
02:14 PM
|
0
|
3
|
1551
|
|
POST
|
I'd have thought you need a where clause?? To get back all records found by the spatial filter, try: q.setWhere("1=1"); You may also need to specify your output fields?? To get back all fields try: q.setOutFields("*"); And I guess it's probably worth specifying the output spatial reference: q.setOutSpatialReference(mMapView.getSpatialReference()); Also, where does the graphic, g, come from? Make sure of the obvious - that it does intersect with some of your features(!) - and that its geometry is definitely in a spatial reference equivalent to that of the MapView. You could check this with the condition: (g.getSpatialReference() == mMapView.getSpatialReference())
... View more
12-02-2014
04:52 AM
|
0
|
5
|
1551
|
|
POST
|
Do you mean you want to project your data to WGS84? Or are you simply trying to specify that the layer's data is WGS84? You can create a WGS84 SpatialReference using the static method create() on that class as follows: SpatialReference wgs84 = SpatialReference.create(SpatialReference.WKID_WGS84) (see SpatialReference | ArcGIS Android 10.2.4 API ) And you can project geometries from one SpatialReference to another using GeometryEngine's static methods for project(...), which allow you either to specify a geotransformation explicitly (if needed) or to leave the choice up to ArcGIS. (see GeometryEngine | ArcGIS Android 10.2.4 API ) If you want to effectively have your layer (in XYZ SpatialReference) re-project on the fly to WGS84, then I'd suggest you do that as part of data / service preparation, rather than trying to code a solution in Android. If, on the other hand, you have no control over the data / service, or there are other sound reasons why you need to re-project on the fly, then your solution will depend on the type and nature of the data you're bringing in. If you are enabling your user to add their own raster data at runtime, then you could use the project method of FileRasterSource, although you'd want to have some knowledge of the SpatialReference(s) in which the user-supplied data was coming. (see FileRasterSource | ArcGIS Android 10.2.4 API ) If it's raster in the form of a TiledLayer, then you don't want to be changing the SpatialReference, or you could experience tile alignment issues. If it's a DynamicLayer, then this class has a protected field supportedSRs, which should presumably give an indication of whether the service will support re-projection to WGS84 (presumably, if it does, and the MapView's SpatialReference is WGS84, then the MapView will handle the renewed call to the service internally... someone else may be in a better position to clarify here, or you could simply test it out??). You'd need to subclass in order to access the protected field, however (or perhaps rely on the MapView giving an error if WGS84 is not supported by the layer??) (see DynamicLayer | ArcGIS Android 10.2.4 API ) If it's a FeatureLayer, then how you change the layer's spatial reference depends on its data source, as described in the doc (under Class Overview): (see FeatureLayer | ArcGIS Android 10.2.4 API ) Hope one of those covers your situation?!
... View more
12-02-2014
04:17 AM
|
1
|
0
|
832
|
|
POST
|
Can anyone advise how to get the android runtime version programmatically? For example, to report that an app is working off the 10.2.4 API in the Help > About area?
... View more
11-28-2014
09:14 AM
|
0
|
1
|
3030
|
|
POST
|
Anyone else found this? I'm using 10.2.0. I have 2 GP tools that both reference project data on a UNC share. ArcGIS Server has a registered Data Store (folder) pointing to the same location. I can publish either tool individually and it successfully publishes without copying data to the server (expected behaviour). However, if, while publishing one, I click "Add Result" in order to pull the second tool into the same service, then now when I publish, all project data gets copied to the server. Is this expected behaviour?
... View more
10-21-2014
02:05 PM
|
0
|
0
|
2286
|
|
POST
|
Note there is now an extended version of the text adaptor that will cope with white space separators (and more) on Github: solutions-geoevent-java/solutions-geoevent/adapters/regexText-adapter at master · Esri/solutions-geoevent-java · GitHub
... View more
10-02-2014
09:51 AM
|
0
|
0
|
902
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-10-2015 01:53 AM | |
| 1 | 02-13-2015 05:02 AM | |
| 1 | 07-02-2018 12:12 PM | |
| 1 | 04-13-2018 04:26 AM | |
| 1 | 02-25-2015 01:57 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|