|
POST
|
Hi Mark, I would recommend using a Python Add-In Combo Box. You can select the query from the drop down and apply it to the desired layers. Here is an example of the code to use for the combo box: import arcpy
import pythonaddins
class ComboBoxClass1(object):
"""Implementation for Query_addin.combobox (ComboBox)"""
def __init__(self):
self.items = ['"parcel_no" = 1', '"parcel_no" = 2', '"parcel_no" = 3', '"parcel_no" = 4', '"parcel_no" = 5']
self.editable = False
self.enabled = True
self.dropdownWidth = 'WWWWWWWWWW'
self.width = 'WWWWWWWWWW'
def onSelChange(self, selection):
self.mxd = arcpy.mapping.MapDocument("CURRENT")
for lyr in arcpy.mapping.ListLayers(self.mxd):
if lyr.name.lower() == "parcels1":
lyr.definitionQuery = selection
if lyr.name.lower() == "parcels2":
lyr.definitionQuery = selection
if lyr.name.lower() == "parcels3":
lyr.definitionQuery = selection
arcpy.RefreshTOC()
arcpy.RefreshActiveView()
... View more
04-22-2013
04:31 AM
|
0
|
0
|
2661
|
|
POST
|
Hi Foram, What user are you connected to the GICDATA geodatabase as? If you are connected as the 'sa' user you will not be able to register a feature class as versioned if it is not owned by DBO (even though the 'sa' user has sysdamin privileges). Connect as the SDE user and see if you are able to register the feature class/dataset as versioned.
... View more
04-22-2013
03:11 AM
|
0
|
0
|
3240
|
|
POST
|
AMJSkinn3, Thanks for your reply, yes I connect as data owner I connect as sa user which has all rights, all permission. I created another database with sa user and it is working fine. this database was created in 10.0 and new data base I created in 10.1. So,Is there any lock or permission issue? Foram Can you post a screen shot of your connection properties (right-click on database > connection properties) and a screen shot of the feature class/dataset you are trying to register as versioned?
... View more
04-19-2013
11:03 AM
|
0
|
0
|
3240
|
|
POST
|
Hi Heath, You could also do this using a Geometry service. A geometry service will allow you to project coordinates. Ex:
dojo.require("dojo.parser");
function extent(){
var URL = "http://server:6080/arcgis/rest/services/Utilities/Geometry/GeometryServer/project?";
var spatRef1 = 3566 //WKID for NAD_1983_StatePlane_Utah_Central
var spatRef2 = 3857 //WKID for Web Mercator
var transformation = 1188 //WKID for esriSRGeoTransformation_NAD1983_To_WGS1984_1
var xMin = layer.fullExtent.xmin;
var yMin = layer.fullExtent.ymin;
var xMax = layer.fullExtent.xmax;
var yMax = layer.fullExtent.ymax;
var geometries = "inSR=" + spatRef1 + "&outSR=" + spatRef2 + '&geometries='
+ '{"geometryType":"esriGeometryEnvelope",'
+ '"geometries":[{"xmin":' + xMin + ',"ymin":' + yMin + ',"xmax":' + xMax + ',"ymax":' + yMax + '}]}'
+ '&transformation=' + transformation
+ '&transformForward=true'
+ '&f=pjson'
var geometryURL = URL + geometries;
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", geometryURL, false );
xmlHttp.send( null )
var jsonResponse = JSON.parse(xmlHttp.responseText);
geom = jsonResponse.geometries[0];
layerExtent = new esri.geometry.Extent({"xmin":geom.xmin,"ymin":geom.ymin,"xmax":geom.xmax,"ymax":geom.ymax,"spatialReference":{"wkid":102100}});
map.setExtent(layerExtent);
}
... View more
04-19-2013
10:30 AM
|
0
|
0
|
844
|
|
POST
|
Make sure the folder is shared, and when adding it to the data store, use a UNC path. Ex: \\server\gis\data
... View more
04-19-2013
07:08 AM
|
0
|
0
|
693
|
|
POST
|
Hi Peter, I wouldn't recommend developing with .NET because the ArcGIS Web ADF (Microsoft .NET Framework) has been deprecated. See here. I would suggest using another API such as JavaScript.
... View more
04-19-2013
05:27 AM
|
0
|
0
|
575
|
|
POST
|
Hi Foram, Are you connected as the data owner when you are trying to register the feature classes as versioned?
... View more
04-19-2013
03:24 AM
|
0
|
0
|
3240
|
|
POST
|
Hi Bill, If you don't want the data to be copied to the ArcGIS Server machine, then Yes, a local arcgis server account must also exist on your machine. You can then create a data store from this directory. The arcgis server account will need to have read privileges to any directory you wish to create a data store from. If you have SDE connections, the path you mentioned stores the connection files there when you create an SDE connection under Database Connections. So, if you wish to create a data store from an SDE geodatabase, the arcgis server account should have read privileges to this directory.
... View more
04-19-2013
02:59 AM
|
0
|
0
|
693
|
|
POST
|
Hi Wes, A mosaic dataset is made up of many tables as you can see. The Overviews will be stored in the "AMD_<dataset name>_OVR" and "SDE_BLK_<RasterColumn_Id>" tables. Overall, a mosaic dataset is made up of the following tables: AMD_<dataset>_ART AMD_<dataset>_BND AMD_<dataset>_CAT AMD_<dataset>_CSL AMD_<dataset>_OVR SDE_AUX_<RasterColumn_Id> SDE_BLK_<RasterColumn_Id> SDE_BND_<RasterColumn_Id> SDE_RAS_<RasterColumn_Id> To find the RasterColumn_Id, you can run the following query: select rastercolumn_id from SDE.raster_columns where TABLE_NAME LIKE '%<dataset>%' When overviews exist, there will be two RasterColumn_Ids. So there will actually be two SDE_AUX, SDE_BLK, SDE_BND, and SDE_RAS tables.
... View more
04-17-2013
08:36 AM
|
0
|
0
|
975
|
|
POST
|
Hi Bruce, ArcMap's raster display options will still apply to a mosaic dataset that has the stretch function applied. For example, go to Customize > ArcMap Options > Raster tab > Raster Layer tab. The stretch and resampling under 'Enable Custom Rendering Defaults' will be applied to the mosaic dataset. So, if the stretch here is set to Standard Deviations, and you have a Standard Deviation stretch function applied, the mosaic dataset with be stretched once by the function, and then again by ArcMap. I'm guessing you have the stretch setting to 'None' within the ArcMap options and this is why you are receiving a black image. The stretch is best used when publishing a mosaic dataset as an image service. If the client application cannot display the raster correctly, you can apply the stretch so that the dataset appears as it should.
... View more
04-17-2013
06:23 AM
|
0
|
0
|
1212
|
|
POST
|
Hi Danik, This appears to only occur with version 3.4 of the Javascript API. This may be a bug. I was not able to reproduce this with version 3.2 or 3.3. If you're able to, you can use one of these versions until this issue is resolved.
... View more
04-15-2013
05:12 AM
|
0
|
0
|
977
|
|
POST
|
The service you are posting to may have REST configured to restrict access. While additional server side configuration is required to use CORS with a 9.3 or 10.0 ArcGIS Server instance, 10.1 instances of ArcGIS Server will support CORS out of the box. Try using the following service: http://sampleserver6.arcgisonline.com/arcgis/rest/services/PhoneIncidents/FeatureServer/0
... View more
04-12-2013
10:36 AM
|
0
|
0
|
2631
|
|
POST
|
Hi James, After you click the button to begin editing, you could have an onClick event send a post through REST to add a point feature where the user clicked. You will need to encode the syntax for REST. Ex: function addFeature(evt){
var X = evt.mapPoint.x
var Y = evt.mapPoint.y
featureService = "http://sever/ArcGIS/rest/services/HSEC/FeatureServer/0/addFeatures?features=";
addPoint = '[{"geometry":{"x":' + X + ',"y":' + Y + '}}]';
addFeaturesEncode();
}
function addFeaturesEncode() {
var unencoded = addPoint;
var obj = encodeURIComponent(unencoded);
var theUrl = featureService + obj;
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.open( "POST", theUrl, false );
xmlHttp.send( null );
} Take a look at calling the attribute inspector after the point is created to update the attributes.
... View more
04-12-2013
07:57 AM
|
0
|
0
|
2631
|
|
POST
|
Scott, Add the 'arcpy.AddMessage' function to your script to print out your where clauses: arcpy.AddMessage(whereClause) Also, what type of data are you working with? (i.e. shapefiles, File Geodatabase feature classes, Personal Geodatabase feature classes)
... View more
04-12-2013
02:39 AM
|
0
|
0
|
1802
|
|
POST
|
Start small and build from there. I would recommend creating a sample feature class called "Cities" and add the "CRIME_INDE" and "UNIVERSITY" fields with attributes. After you have some sample data, don't use any parameters and try to get the expression syntax correct. The below worked for me for a sample feature class in a File Geodatabase: import arcpy
from arcpy import env
env.overwriteOutput = 1
env.workspace = r"C:\Temp\Python\Test.gdb"
citiesL = "citiesL"
crimeField = "CRIME_INDE"
crimefieldindex = "0.02"
whereClause = '"' + crimeField + '" <=' + "'" + crimefieldindex + "'"
universityField = "UNIVERSITY"
universityfieldindex = "1"
whereClause2 = '"' + universityField + '" =' + "'" + universityfieldindex + "'"
arcpy.MakeFeatureLayer_management("Cities", citiesL)
arcpy.SelectLayerByAttribute_management(citiesL, "NEW_SELECTION", whereClause + "AND" + whereClause2)
arcpy.CopyFeatures_management(citiesL, "Cities2") Once you have that working, sub the values for the variables with the 'arcpy.GetParameterAsText' functions. Then set up the parameters within the toolbox and verify it's still working when you run the tool through ArcMap. Afterwards, you can continue to add to your code.
... View more
04-11-2013
08:24 AM
|
0
|
0
|
3802
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a month ago | |
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM |
| Online Status |
Online
|
| Date Last Visited |
2 hours ago
|