|
POST
|
Here is some code that you can work with. What the code does is iterate through a feature class and searches all features in every feature class within the geodatabase to see if any features intersect (see the disjoint method here). If features do, it adds the feature class name to a list. I would recommend creating a single polygon from the input feature class's extent. The code will then just have to iterate through one input feature rather than many. import arcpy from arcpy import env env.workspace = r"C:\temp\python\test.gdb" list = [] dataset = "Polygon" spatial_ref = arcpy.Describe(dataset).spatialReference with arcpy.da.SearchCursor(dataset, ["SHAPE@"], "") as cursor: for row in cursor: for fc in arcpy.ListFeatureClasses("*"): with arcpy.da.SearchCursor(fc, ["SHAPE@"], "", spatial_ref) as cursor2: for row2 in cursor2: if not row[0].disjoint(row2[0]): list.append(fc) del cursor, cursor2 #remove duplicates from list list = dict.fromkeys(list) list = list.keys() print list
... View more
03-17-2014
07:56 AM
|
0
|
0
|
1798
|
|
POST
|
Hi Christian, You can fire the 'getCoordinates' function when only the Feature Layer is clicked. Ex: var featureLayer = new FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0",{
mode: FeatureLayer.MODE_ONDEMAND,
});
map.addLayer(featureLayer);
on(featureLayer, "click", getCoordinates);
function getCoordinates(event) {
var mp = esri.geometry.webMercatorToGeographic(event.mapPoint);
alert(mp.x.toFixed(6) + ", " + mp.y.toFixed(6));
}
... View more
03-17-2014
06:43 AM
|
0
|
0
|
3365
|
|
POST
|
Hi Dirk, Does this have to be accomplished using python? It may be easiest to use Search in ArcMap. You can add data to ArcMap that you would like to find which data intersects with it and specify an extent option: [ATTACH=CONFIG]32229[/ATTACH]
... View more
03-17-2014
04:55 AM
|
0
|
0
|
1798
|
|
POST
|
Hi Martin, This usually occurs when the client machine does not have access to the raw imagery. At small scales, the mosaic dataset's overviews are used. As you zoom in to larger scales, the raw imagery is eventually returned. It's recommended to load rasters into mosaic datasets using UNC paths (i.e. \\server\rasters). That way, each client machine knows where to access the imagery.
... View more
03-17-2014
04:48 AM
|
0
|
0
|
1552
|
|
POST
|
Hi Kevin, MrSID files store pyramids internally, so there won't be an associated pyramid file (.ovr). I would recommend not including the JPGs. Also, I would recommend creating a Mosaic Dataset of the MrSIDs if you're not already. A mosaic dataset will save you storage space, creation time, and perform much faster.
... View more
03-17-2014
04:45 AM
|
0
|
0
|
1321
|
|
POST
|
Hi Annett, Can you post the expression you are attempting to run?
... View more
03-14-2014
04:29 AM
|
0
|
0
|
669
|
|
POST
|
Hi Alex, It doesn't look like you are referencing the AccordionContainer module. This should fix the issue.
... View more
03-13-2014
11:54 AM
|
0
|
0
|
1682
|
|
POST
|
Sorry, Christian. I misunderstood you. Take a look at this jsfiddle. I believe this is what you are looking for.
... View more
03-13-2014
06:39 AM
|
0
|
0
|
1151
|
|
POST
|
Hi Andrew, You can use the python extension cx_Oracle to run a SQL query to find which feature classes have a domain applied. You can then loop through each feature class and find which fields have a domain applied. Here is an example: import cx_Oracle, arcpy
from arcpy import env
connstr = 'sde/sde@orcl'
conn = cx_Oracle.connect(connstr)
curs = conn.cursor()
list = []
#find feature classes that contain a domain and append to list
curs.execute("select UUID from sde.gdb_items where type = '{8C368B12-A12E-4C7E-9638-C9C64E69E98F}'")
for row in curs:
curs2 = conn.cursor()
curs2.execute("select ORIGINID from SDE.gdb_itemrelationships where DESTID = '" + row[0] + "'")
for row2 in curs2:
curs3 = conn.cursor()
curs3.execute("select NAME from sde.gdb_items where UUID = '" + row2[0] + "'")
for row3 in curs3:
list.append(row3[0])
conn.close()
#remove duplicates from list
list = dict.fromkeys(list)
list = list.keys()
env.workspace = r"Database Connections\[email protected]"
#loop through fields to find which has a domain
for fc in list:
for field in arcpy.ListFields(fc):
if field.domain:
print fc, field.name
... View more
03-13-2014
05:09 AM
|
0
|
0
|
5310
|
|
POST
|
You could do something like this: array.forEach(map.graphics.graphics, function(feature, index){
if(feature.geometry.type == 'polygon'){
var count = 0;
array.forEach(map.graphics.graphics[index].geometry.rings[0], function(ring){
count++
})
console.log(count);
}
})
... View more
03-12-2014
10:31 AM
|
0
|
0
|
1151
|
|
POST
|
Hello, You will just need to update the 'relatedQuery.relationshipId' from 0 to 2: relatedQuery.relationshipId = 2; [ATTACH=CONFIG]32148[/ATTACH]
... View more
03-12-2014
06:39 AM
|
1
|
0
|
826
|
|
POST
|
Hi Michelle, By default the maximum number of records returned by the server is set to 1,000. You can increase this by right-click on the service in the Catalog window > Service Properties > Parameters.
... View more
03-12-2014
06:17 AM
|
0
|
0
|
1275
|
|
POST
|
Hi Spencer, You could use the setVisibleLayers method to query which layers to add. You could apply transparency to the polygons, and display the other layers with no transparency. Ex:
//transparency applied
var lyrUSA = new ArcGISDynamicMapServiceLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer", {
opacity : 0.5
});
lyrUSA.setVisibleLayers([0,2]);
map.addLayer(lyrUSA);
//no transparency
var lyrUSA2 = new ArcGISDynamicMapServiceLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer");
lyrUSA2.setVisibleLayers([1,3]);
map.addLayer(lyrUSA2);
... View more
03-12-2014
05:04 AM
|
0
|
0
|
1886
|
|
POST
|
Here is an update to the function to show a popup once the point is displayed: dojo.connect(queryTask, "onComplete", function (featureSet) {
map.graphics.clear();
dojo.forEach(featureSet.features, function (feature) {
var point = new Point(feature.geometry.x, feature.geometry.y, new SpatialReference({wkid:4326}));
var simpleMarkerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 10,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
new Color([0,255,0,0.25]), 1),
new Color([255,0,0])
)
attr = {"Velocity": feature.attributes.Velocity};
var infoTemplate = new InfoTemplate("Attributes", "Velocity: ${Velocity}");
var graphic = new Graphic(point, simpleMarkerSymbol, attr, infoTemplate);
map.graphics.add(graphic);
featureArray = [];
featureArray.push(graphic);
map.infoWindow.setFeatures(featureArray);
map.infoWindow.show(point);
});
}); Don't forget to add the InfoTemplate module.
... View more
03-10-2014
05:58 AM
|
0
|
0
|
2427
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-08-2026 12:27 PM | |
| 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 |
Offline
|
| Date Last Visited |
Tuesday
|