Tag Info

Hot answers tagged

10

The way to do this is to create a map package: Map packages (.mpk) make it easy to share complete map documents with others. A map package contains a map document (.mxd) and the data referenced by the layers it contains, packaged into one convenient, portable file. The downside of this will be that with the inclusion of raster data sources, your ...


7

I recommend using the Select_analysis tool which will accept a where clause. arcpy.Select_analysis("C:/CGDP.shp", "C:/New.shp", ' "GDP_TOP10" = 1 ')


6

Have you tried simply copying and pasting features? You can do this by adding both shapefiles to the map TOC, then choose "Editing-> Start Editing", and choose the DESTINATION shapefile workspace to edit. Next, choose the "Edit Tool" (small arrowhead by the Editor dropdown), select the SOURCE feature to copy, right-click and choose "Copy". Right-click and ...


5

It's difficult, though possible, to corrupt a file geodatabase. You should certainly delete the table that was loading when the application was terminated. 22k points doesn't seem like a lot, so there may be other issues at play here (and these issues may increase the probability of corruption).


5

You could automate this using a python/arcpy script. The script flow would go something like this: Generate xy coordinates for all your address features using the Add XY Coordinates tool/code Create a new address field to hold new address value using Add Field Use a SearchCursor to iterate through your address feature class/address field and look for ...


5

There is an existing ArcGIS Idea covering this functionality that you can vote for. In the meantime a workaround may be as follows: This will work only on a feature class NOT a table so if you need a table create a feature class with the same number of records and use Join Fields to make a temporary feature class that you can turn back to a table later. ...


5

You can open layers contained in a project into the current QGIS session by using the Import Layers to Project plugin. This will let you choose which layers you would like to load into your current QGIS session. You could also take a look at the Embed Layers and Groups functionality. This allows you to open layers from a project. It stops you from ...


4

You want to use the Append_Management tool. If you know the attribute tables will match up (including data type), use schema_type NO_TEST anyway (even though the documentation would suggest TEST). If the attribute tables do not match up you will have to deal with field mappings, which can be a huge pain in arcpy. (If you are using NO_TEST and a subtype, ...


3

Why not make everything relative to your MXD? This approach only works if what you are doing can have all the data stored in sub-folders relative to your MXD. This works well with small projects. But you don't say where your data is? If they are spread across multiple drive spaces then as suggested by @PolyGeo the map package is probably your only option. ...


3

In ArcMap - you could do the following: Select the polygon you want to copy. Open the Python window and type in the following code: cur,row = None, None cur = arcpy.SearchCursor("NAME OF THE LAYER HERE") x = 113 for row in cur: shp = row.getValue("SHAPE") cur,row = None, None cur = arcpy.InsertCursor("NAME OF THE LAYER HERE") for i in range(0,x): ...


3

Normally the files created by SEXTANTE toolsets like SAGA are saved temporarily somewhere. Click on the raster and look in the options/metadata. In the QGIS Master version (1.9) there is also the option to save the raster via "save-as" if you rightclick on the rasterlayer. But you could also simply use the gdal-tools like this (without prior testing): -> ...


3

Create a feature layer with a selection, then use CopyFeatures: arcpy.management.MakeFeatureLayer("C:/CGDP.shp", "new_layer", ' "GDP_TOP10" = 1 ') arcpy.management.CopyFeatures("new_layer", "c:/new.shp") arcpy.management.Delete("new_layer")


2

The MakeQueryTable tool will do what you need. I've used MakeQueryTable in a one-to-many join from Polygon data, producing stacked polygons. All your data must reside in the same Geodatabase. You must specify a Geometry field in the in_fields parameter. It takes some trial and error to get the results you want. The output is a Layer, so you must run ...


2

If you are only dealing with a few polygons, I would use the Replace Geometry tool on the Advanced Editing toolbar. See http://resources.arcgis.com/en/help/main/10.1/index.html#//01m80000001s000000 Alternately for a few polygons you could copy and paste the polygon(s) into layer B and then use the attribute transfer tool on the Spatial Adjustment toolbar ...


2

I would consider using the arcpy.da.UpdateCursor and SHAPE@ token for representing the geometry object. First, you have iterate through the rows to find if the value in some unique ID field matches, and if yes > replace the source geometry with the target one.


2

Assuming that your features are non-complex, you will want to use an Insert Cursor (method 1). If your features are complex, you must use IFeature.Store() (method 2). See the following code from this link (It's in VBA, but shouldn't take long to translate over) Public Sub LoadFeatures() Dim pMxDoc As IMxDocument Dim pFeatureLayer As IFeatureLayer ...


2

There is no Geoprocessing tool to do this and as mentioned in the comments by @blah238 and @vince there is no case for one to be developed because you cannot "rely on the consistency of ObjectIDs for any purpose. Instead, you should have a persistent and unique ID in a separate column... [However, you could] calculate a new field based on the current ...


2

You don't want copy, you want Select. You'll select the layer you want from the Solve and carry on with that. The Solve output is a group of layers. After you select it out, I believe it's still a layer, as such you wont need to MakeFeatureLayer. You should just be able to do your SelectByLocation with it.


2

If you simply want to copy the rasters without changing format, compression, or building overviews then use standard filesystem copy (in the shutil module) instead of the CopyRaster tool as i.e. import shutil shutil.copy(inpath, outpath) You could also use the Copy tool arcpy.Copy_management(inpath, outpath) The advantage of the Copy tool is that it ...


2

If you want a new shapefile, containing just some of the existing parcels, but no others, simply query for, or select the ones you want, then right-click on the layer select Data, then Export Data. If you have an existing shapefile follow the advise of @Maksim


1

Looks like you did it a little out of order and you need to use the standard toolbar to do the copy/paste. Per ArcGIS Resources here, you need to do the following: Steps: Click the Edit tool or the Edit Annotation tool on the Editor toolbar and select the annotation. Hold down the SHIFT key while clicking features to select additional features. Click the ...


1

Either make a selection of the polygons you need, right click, copy, then paste into your new shapefile in the interactive window. Or, use append, to add the selected polygons to a shapefile of your choosing.


1

The different methods of storing rasters in ArcMap are a little confusing. If you have a Raster Catalog, the actual raster data may be stored in a different folder, not directly in the geodatabase. Raster datasets can be managed within or as links on file system Given the very different file sizes in this case, this "link" storage is more likely. ...


1

I think a Join would actually serve you best. Instead of using a search cursor, join the two tables together with a common field (say ID) and use the field calculator with an if statement. So in TA (the one you want to update and check for NULL values) select the field you want to update ( CURR_TYPE). Then in the field you want to update use Field ...


1

Map package, as suggested by @PolyGeo, is the way to go if you want to distribute the map along with the data, relative path may also work in some situations as pointed out by @Hornbydd but you can also easily fix multiple "broken links" by clicking the red exclamation mark rather then linking individual data sources. Clicking the exclamation mark will ...


1

You'll need to configure your environmental variables for rasters. By default, its going to build pyramids and change the compression level of the file. You can read more about them here. Pyramids are reduced-resolution representations of your dataset. They can speed up display of raster datasets by retrieving only the data that is necessary at a ...


1

This might be for what you are looking: You need to right click on the attribute table, on the little gray squares all the way to the left. The output will be all the fields (including names), tab delimited.


1

The easiest way I can think of is to either copy and paste the features or use the Copy Features GP tool. That doesn't use C#. If you really want to do with using C#, you could create an add-in or GP tool. You could use search and insert cursors to actually copy the features. Or, you could call the Copy Features GP tool from C# to do the work.


1

Most probably your project CRS is set to default WGS84, that is lat/lon degrees. You better set the project CRS to that of the Geotiff you created. Then the values for vector grid are in the units of the CRS. You can select min and max values to the ones you need, either by taking the values written on the map, or moving the mouse to the lines and noting ...


1

If you cant find the temp file... I've several times simply run the raster calculator on the temp-file to result in zero difference like "x >=0 OR x <=0" ;-) This multiplied (cause always 1) with you temp-file will give you a raster you can save.



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