Tag Info

Hot answers tagged

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 ...


10

Which part of the script is actually taking up most of the time? There are about 5 other steps going on before you actually start deleting stuff. You might want to break your script down into bite-sized tests. For example, instead of creating a temporary connection file, listing a bunch of datasets, listing their contents, counting their records, and then ...


9

By "midpoint" I'm assuming you're asking about a centroid. For polygons, you'll want to cast it to an IArea object (see link for example), and then access the Centroid property. For points, you can simply get the X/Y property of the IPoint object. To get the feature, you can use various IFeatureClass methods such as GetFeature to access it using the ...


8

The trick to feedback is setting ISymbol.ROP to esriROPNotXOrPen and drawing the geometry twice, the first draw displays it, the second draw erases it. Be sure if you're using a multilayer symbol to set the ROP for each layer. public class MyTool : ESRI.ArcGIS.Desktop.AddIns.Tool { private ISymbol m_Symbol; private IPoint m_lastPoint; private ...


7

Another approach to this would be to use the Spatial Join tool. Use the point as your input feature layer as above and the polygon layer as your identity features.Unlike SelectLayerByLocation, SpatialJoin does honor the extent environment. targetlayer = layername joinlayer=arcpy.PointGeometry(arcpy.Point(x, y)) fieldmappings = arcpy.FieldMappings() ...


7

While there is no comfortable editor for label properties available yet, you can achieve the effect of label classes using "data defined labeling": This requires some data preparation, but the results should be just what you are looking for. Also of interest to you might be the new labeling tools by Sourcepole: move label tool … move text labels to a ...


7

Here's how I would do it: Make sure your data are in an appropriate projected coordinate system. Add a new Double field to the attribute table called Area. Run field calculator on this new field with the expression: !shape.area! and Python as the parser. Run Summary Statistics, performing COUNT on the Name field, and MAX on the Area field we added in step ...


6

GeoServer provides a user setting to control the number of decimal places in the geometries which was put in there to speed up WFS serving. Also make sure that the server is compressing the output only if your client can efficiently uncompress it. Finally I've heard good things about tiny OWS in terms of speed.


6

What about simplifying geometries? http://www.bostongis.com/postgis_simplify.snippet http://stackoverflow.com/questions/1849928/how-to-intelligently-degrade-or-smooth-gis-data-simplifying-polygons Or maybe a combination of WFS, WFS with simplified features and WMS?


6

In the attribute table, compute a numeric field with the Python expression !shape.getpart(0).count! The triangles will all have values of 4 (three vertices plus a duplicate of the first one to close the polygon). The islands almost surely will have more than 4: select them based on this count and delete them, or (more safely) set the layer's definition ...


6

The Feature Class to Feature Class tool is a Conversion tool. The idea is to convert a feature class in one format (e.g. shapefile) to another (e.g. geodatabase). It also allows the user to control the Field Map - i.e. which fields will be copied over. The Copy Features tool simply creates an exact copy of the input features. Note - this tool can also be ...


5

WFS caching might suit your needs. As far as I know, there are two open source solutions providing WFS caching: TileStache and GeoWebCache. In TileStache's home page, features section it is said "Generates vector tiles from OGR datasources in GeoJSON usable in Polymaps" GeoWebCache has some WFS caching capabilities since version 1.1.0 (the current one is ...


5

Try calling Store. pFeature.value(pFeature.Fields.FindField("Type")) = "update" pFeature.Store() Set pFeature = pEnumFeature.Next Are you in an edit session? Scroll down to best practices: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/00010000010s000000.htm


5

Feature classes and object classes do have their ids, which are unique within a single geodatabase. This very often satisfies most scenarios similar to yours. If you cannot uniquely identify a layer based on its feature class, you can leverage layer extensions to store arbitrary data with the layer. A layer extension can be added to a layer via ...


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 ...


5

Few options. Some crazier :-) than others. The basic strategies are Cluster features Hide/move the top feature Send the click through the top feature ==> Turn on feature clustering strategy Implement your own clustering algorithm, so when a new item is added or modified, your algorithm re-runs and does a nested for-loop check and n*n(-1) checks to ...


5

You should use esriSpatialRelEnum.esriSpatialRelRelation instead and set the SpatialRelDescription property to pSFilter.SpatialRelDescription = "T***F****". This will only return the features that have the interiors intersecting.


5

You can unselect features with unselect and unselectAll methods of SelectFeature control: selectControl = new OpenLayers.Control.SelectFeature(vectorLayer); ... map.addControls([selectControl]); selectControl.activate(); // unselect any specific feature... selectControl.unselect(vectorLayer.features[0]); // ...or all features selectControl.unselectAll(); ...


5

An even easier method than I mentioned in my Comment is to use the Select_analysis tool which will accept a where clause. arcpy.Select_analysis("C:/CGDP.shp", "C:/New.shp", ' "GDP_TOP10" = 1 ')


4

The vertices are stored in two different properties of the ModifyFeature control - virtual vertices and vertices. You could check which group the vertex belonged to in the dragVertex event, and if it is in the virtual vertex array then ignore it. If you also set the virtualStyle of the control then these virtual vertices will be invisible. ...


4

Assuming you don't want to do this programmatically and with as little fuss as possible... At least at 9.3, ArcMap has an 'Add XY Coordinates' tool (under the Data Management -> Features toolbox). You can run this, which will add a field for the X & Y components of the point coordinate. You can open the attribute table of the layer and export (using ...


4

Hallo Merging or union as it is also often called can be more or less expensive depending on how the polygons are put together. If you start a one side and merge one polygon after another onto the resulting bigger and bigger polygon there will be a lot of work traversing the bigger resulting polygon for each added small polygon. One way to make this more ...


4

Are you using a profiler? You are making multiple delete and store calls. These are expensive: Try: Reducing the number of times you call each function (store and delete); Merge all polygons, store only once (or a few times, after 'n' iterations); Delete only once (check ITable.DeleteSearchedRows(IFilter)); To delete only once, you can store a list of ...


4

You could get a list of the featuredatasets using the ListDatasets function, then loop through that list to get at the featureclasses within each featuredataset. From the docs: datasetList = arcpy.ListDatasets("C*", "Feature") for dataset in datasetList: print dataset


4

As I understood you need to increase number of vertices for your polyline features. And also to transform all "Beizer Curve, Circular Arc, Elliptic Arc" segments into several line segments. For this task in ArcGIS you can use Densify (Editing) tool in ArcToolbox. Then you can convert your polylines' vertices to point features as suggested Darren Cope and ...


4

I know this is old but I was looking for the same as I don't have ArcInfo for the FeatureVerticesToPoints tools. After using Search cursor solution above I went forward to simplify the code and found that using NumPy Arrays in the Data Access Module a simple and very quick script could be produced. I'm using this as a script tool. Note: The key is the ...


4

If upgrading to ArcGIS 10.1 (now released) is an option then I just found this in the What's New in ArcGIS 10.1 PDF: New tool to delete all rows from a table The TruncateTable geoprocessing tool in the Tables toolset can be used to delete all rows from a table or feature class. You should use the Truncate Table tool instead of the Delete Rows ...


4

See my LIVE DEMO. Here is working code: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Title</title> <script src="http://openlayers.org/dev/OpenLayers.js"></script> <script type="text/javascript"> function init(){ options = { div: "map", zoom: 2, center: [0, 0], ...


4

Create a Real Number field in the shapefile. From Attribute table, open 'Field Calculator'. From the functions list, expand 'Geometry' section. selection length. The expression would look $length Check update existing field at the top of field calculator and select the newly created double field name.


3

Is the feature layer you are creating a parameter for your tool? If not, then the results of are not added to the display. Consider the following workflow (simplified to demonstrate). In this example there are a variety of shapefiles created from a union, a clip, then a conversion of multipart to single part shapes. The only file that is added to the ...



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