Hot answers tagged feature-layer
15
Vector data can have properties stored at two levels. File level or Layer level.
For feature class (a type of vector data), file level information is stored in a geodatabase. This consists of properties like feature class geometry, attribute table, assigned subtypes and domains, a coordinate system, etc:. All these file level properties make up the actual ...
6
There are a couple of reasons why you want to reference Feature Layers in ModelBuilder, as opposed to Feature Classes. First it is helpful to understand the differences.
"Feature Classes" as simply references to the raw data, in its entirety. One simple example of this where the FC is a shapefile on disk.
"Feature Layers" are references to an ...
5
It sounds like you've reached your browser's memory limits in regards to the data returned by arcgis server 10.1. The maximum number of records returned by WFS and ArcGIS Feature Layer depend on how it was set up by the server (default is 1000 for anything running through ArcGIS Server). You can reconfigure it to send more, but then you run into poor browser ...
5
These terms specifically relate to the ESRI software and data schemas.
A feature class is a set of common geographic features, for example roads, or parcels, or land use, as they are stored in a geodatabase or shapefile, or other storage format. Here is the help file on Feature Class Basics.
A feature layer is the representation of a feature class after ...
4
Have you tried clearing the ArcGIS server rest cache?
http://blogs.esri.com/esri/arcgis/2010/10/08/clearing-the-arcgis-services-directory-cache-the-easy-way/
Also you cleared the browser cache/tried a different browser?
4
You are doing two things going on here.
You have a click handler, that, when there is a click on the map, it creates a new selection using the point geometry from the click. That handler is toggled on and off by your clickConnect function.
But you also have a draw handler, that on draw end creates a new selection using the geometry from the drawing toolbar. ...
4
Incorporating temporary layers into your models also decreases processing time. From a processing standpoint, it is much more efficient writing to memory compared to writing to disk. Similarly, you can write temporary data to in_memory workspace, which is also more computationally efficient.
Many operations in ArcGIS require temporary layers as inputs. ...
3
arcpy.management.MakeFeatureLayer doesn't make a layer file, it makes a layer in memory. ExportReport requires a layer object. Combining the two, you can do this:
# Make the layer
arcpy.management.MakeFeatureLayer("SOILFC", "soil_layer")
# Get reference to layer
lyr = arcpy.mapping.Layer("soil_layer")
# Do the magic part
arcpy.mapping.ExportReport(lyr, ...
3
You need to set the renderer for your layer. Since you want to use the same symbology for all, you will have to use a ISimpleRenderer
Using an IFillSymbol, you can set the border and the color for your polygons. Set this as the symbol for your ISimpleRenderer and set that as the FetureRenderer on your IFeatureLayer.
Also have a look at this article: How to ...
3
With featureLayers I think you need to reference a single layer in a map service or feature service. So, instead of:
http://localhost:6080/arcgis/rest/services/CalvertCity_Test_2/MapServer
try
http://localhost:6080/arcgis/rest/services/CalvertCity_Test_2/MapServer/0
change the "0" at the end to match the layer you are interested in.
3
In simple terms ...
I try to think of a feature class being a spatial dataset, i.e. not much more than x,y coords and attributes on disk, while a layer applies symbology (and many other lesser known properties) to a spatial dataset.
A layer does not store data, just symbology and a link to where the data is located on a disk somewhere.
Feature classes ...
3
what it means as conceptual, you can check out GIS Dictionary from ESRI, here.
Feature Class
In ArcGIS, a collection of geographic features with the same geometry
type (such as point, line, or polygon), the same attributes, and the
same spatial reference. Feature classes can be stored in geodatabases,
shapefiles, coverages, or other data formats. ...
3
Use a renderer. In your case, a SimpleRenderer is probably ideal. There are several samples that demonstrate this...the Unique Value Renderer sample is one.
3
The answer is Yes.
Have a look at this sample: Generalized Data.
If you have a look at the Original Services, the Feature service is wkid:4267, while the map and the tiled map service are in wkid:3857/102100.
If you have a look at the service call using Firebug, you will see that the data is requested in wkid 102100:
2
It looks like your spatial reference doesn't match your coordinates. Wkid 4326 == WGS84 which is lat/long but your coordinates are definitely not lat/long. I haven't tested your code but if fixing the spat ref issue doesn't work I'll start testing some stuff.
Edit: I played around with the code you posted and it looks like you need to specify an ObjectID ...
2
'featureCollection' expects a 'features' attribute which is a FeatureSet, and not a featureSet attribute like you are doing:
var featureCollection = {
layerDefinition: {
"geometryType": "esriGeometryPolyline",
"fields": [
{
"name": "OBJECTID",
"type": "esriFieldTypeOID"
},
{
...
2
Actually I think I figured it out.
Override the standard featureLayer onClick behaviour using:
dojo.connect(featureLayer1, "onClick", function () {
map.infoWindow.resize(width1,height1)
});
dojo.connect(featureLayer2, "onClick", function () {
map.infoWindow.resize(width2,height2)
});
2
You're pretty close. The only reason it's not working is because you need to wrap your layerVisibility function call in an anonymous function.
When you type this:
dojo.connect(dijit.byId('imagery'), 'onChange', layerVisibility(mapLayers[0]));
..you're actually calling layerVisibility function immediately rather than having the function call triggered by ...
2
I think I found the answer, which was to insert a short pause before adding the layers.
//Add the layers, after pausing briefly
setTimeout(function(){
console.log("pausing a few seconds");
map.addLayers(mapLayers);
},1000);
After defining the layers from JSON in the loop, I'm running some other operations on the layers. I haven't had time to debug ...
2
Use Selection mode for the feature layer. Set your symbol using Layer.setSelectionSymbol(symbol). If you have a complex symbology, set the renderer instead and leave the selection symbol blank.
There are two ways to go about the next part.
Method one:
Use the checkboxes to composite a complex query. For example, if each feature has a unique identifier ...
2
Check out this post I just wrote on selecting a polygon and highlighting it. Once you have the polygon that was clicked on, you simply do a query with intersection. ArcGIS JS Api: Click on feature, create a particular new map?
You could substitute below into the mapOnClick(evt) function above...
var queryTask = new esri.tasks.QueryTask(YourServiceName),
...
2
If you can't process the data beforehand, another method may be to add the layers as separate FeatureLayers in the map, and use the geometry of the selected polygon to query the point layer. When the selection is complete, do a count of the features using FeatureLayer::getSelectedFeatures and use that count to provide information in your popup.
Here is a ...
2
MakeFeatureLayer makes an in_memory layer. When using that tool you dont supply an extension. A layer with an extension of .lyr is a layerfile on disk. Typically a layer file on disk is a pointer to data with symbology set.
Anyways... to answer your question, you want an arcpy.mapping.Layer for use with the export tool
Try this....(assuming you have a .LYR ...
2
The Layer class has methods suspend() and resume(), so you could catch the onUpdateStart event to suspend all but the lowest layer from drawing. Then, in the onUpdateEnd event of the lowest layer you could call resume() for the next layer up, and so on.
Or if you're using FeatureLayers you could trigger each layer's refresh() method in order. Either way ...
2
Based on this error that you reported "Feature Access requires that the data be on SDE; other types of data sources are not supported", I'm assuming that your data is stored in either a file GDB, personal GDB or shapefile. If you are trying to edit data in a feature service, then your editable data has to be in an enterprise SDE database. Here is a link ...
2
I haven't tried this personally, but it looks like you need to access the GraduatedColorsSymbology class on the layer. Have a look at the second example at the bottom of this page.
It also looks like you may need to have an existing lyr file with the graduated colours already set in order to use UpdateLayer.
2
Models may have many sub process output layers depending on their size and complexity. To eliminate files being written onto your hard disk, some tools make you use feature layers (e.g. Iterate Feature Selection, or Select by Attribute). Feature layers are temporary and will not persist after your model ends.
See Make Feature Layer
1
As @Sunil notes: for the tiles part, see the Tiles in local storage developer sample and for the feature layers see Local storage - experimental. Each sample is complete, in the sense that they're working demos, you'll still need to modify to suit your local circumstances.
1
After reviewing the data within resultLyr.graphics, the graphics have attributes, but no geometry. That's why they're not showing up on the map. Make sure your geoprocessing service is returning those geometries. Also, check that the layer the geoprocessing service accesses has access to the shape attribute of the feature.
1
The parameter visibleLayers isn't an option used in the construction of an ArcGISDynamicMapServiceLayer. What you can do is call the setVisibleLayers method on the layer before adding it to the map. Here's an example using your example:
var ftrLyr = new esri.layers.ArcGISDynamicMapServiceLayer(url);
ftrLyr.setVisibleLayers([1]);
map.addLayer(ftrLyr);
Only top voted, non community-wiki answers of a minimum length are eligible


