Tag Info

Hot answers tagged

16

From the GDAL manual: A merge of two shapefiles 'file1.shp' and 'file2.shp' into a new file 'file_merged.shp' is performed like this: % ogr2ogr file_merged.shp file1.shp % ogr2ogr -update -append file_merged.shp file2.shp -nln file_merged The second command is opening file_merged.shp in update mode, and trying to find existing layers and append the ...


10

Similar to the merge function is building a virtual raster: Raster-> Miscellaneous-> Build Virtual Raster (Catalog) This leverages the GDAL Virtual format (.vrt), which is an XML file that defines how the files are positioned, etc. Virtual rasters can save considerable disk space, and QGIS 'sees' them as a single file. This is very useful for ...


7

(Pre-flight-check: are attributes identical in all original tables? Is the geometry type exactly the same in all tables?) You can either create the (empty) table first, then use INSERT INTO...SELECT... FROM to get all the data from each of the original tables into the merged one. Create the new table from one big UNION statement. For 1 it might go: ...


7

You can use Table Manager Plugin in QGIS to rename, delete and sort table attributes. You can try harmonize the shapefiles structure. There is one limitation, Table manager won't be able to change attribute types. If you have an attribute that is a "text" in one shapefile and a "integer" in the other, you have to create a temporary attribute and convert the ...


5

The unionSpatialPolygons function in the maptools package does this. You supply to it a SpatialPolygons and a vector which indicates which polygons (zip codes, in your example) belong to which aggregated polygon (sales areas). EDIT: The help page on unionSpatialPolygons has a good example of creating a grouping/indexing vector. It using counties in North ...


5

Fusion Tables, Google Visualization API and VizMaps with Google Maps API may be what you are looking for: Fusion Tables: "Google Fusion Tables lets you store, share, query, and visualize data tables. It offers a REST API to manage tables, info window templates, and styles. The query endpoint offers allows you to manage data rows (insert/update/delete), and ...


4

No need to turn the raster into polygons. You'll want to do it in multiple passes. First you want to resample the lower resolution dataset to as close as you can get and a multiple of the higher resolution dataset using bilinear interpolation which should get you a better looking resampling. Then do the merge as normal using your nearest neighbor (which I ...


4

If the LineString is simply to be subdivided at a position closest to the given Point, you could do what you want with this (splits LineString at closest Point to given Point and remerges the two segements afterwards) SELECT ST_AsText( ST_LineMerge( ST_Union( ST_Line_Substring(line, 0, ST_Line_Locate_Point(line, point)), ...


4

Consider the following workflow: Add Field to polygon feature class Calculate field (See attached Code Block) Dissolve based on your new reclassified field values (i.e. 1 or 2) Hopefully this simplified approach, or a variation of it, will work for you.


4

In GIS context, the better is organize your data in a database (!). Then, many kinds of operations will be simple. With PostGIS (using PostgreSQL as database) the command that solves your problem is SELECT ST_Collect(geom) FROM your30000features_table; And the commands are standard, see standard OGC functions ST_Collect and ST_Union. Using as input ...


4

You're looking for the Dissolve tool - if all of your polygons are in the same featureclass/layer just run it and then use the Field Calculator to determine the area. If your polygons are in different featureclasses, run the Merge or Append tool first.


3

You could try Geomerge. I'm not sure how many records it can handle, but so long as the table structure is the same for all files I have not had any problems with it. The MapBrowser available on the same website is also an excellent little tool for quick viewing of shapefiles without having to open up a GIS package.


3

In the past I've had this problem too. It seemed to come and go with different versions of QGIS and I never found a reason for this. You can work around the problem by making a virtual raster from your raster images. Raster -> Miscellaneous -> Build Virtual Raster (Catalog). This will build a *.vrt file that you can treat exactly as if it was a merged ...


3

I've done something similar lately using an update cursor and the xlrd-library with python. The script updates some existing records with the data from the excel sheet. Hopefully this will be of some use for someone else. import xlrd import sys, os # Geoprocessor-object (ArcMap 9.1 and older) try: import win32com.client gp = ...


3

Merge takes both geometry and attributes and combines (merges) the entire dataset into a new feature dataset. Append is good way to join extra data to an existing dataset - it can have options to control subtypes of features being appended. http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000055000000 The key difference is If the Schema ...


3

I am assuming that you have pre-determined the combinations of admininstrative units that will generate each TTWA equivalent, and that this is in the form of a list like this: Admin TTWA Southampton UA 1 Eastleigh 1 Test Valley 1 Gosport 2 Fareham 2 Portsmouth UA 2 In which case you need to transfer this list ...


3

First, welcome to the site! To check your data back in you need to run Check-In (form the Data Manager Toolbar) for each of the AXF files. This will check modifications (edit, create & delete) back into the parent Geodatabase. Note that if there are any conflicts, last in wins (ie, new data will overwrite existing data even if that data had changed ...


3

Something like this (untested) should put you on the right track: import os import arcpy import fnmatch def listCountyPOIs(county_folder): pois = [] for dirpath, dirnames, filenames in os.walk(county_folder): for filename in filenames: fullpath = os.path.join(dirpath, filename) if fnmatch.fnmatch(fullpath, ...


2

I'm not sure you can transfer that type of logic to modelbuilder. But are you aware that you can wire up a script to a model builder tool? Why bother with any thing else as you have the framework of logic in your existing script (it just needs tweaking)? Once you add your script as a "tool script" it looks and behaves like any other geoprocessing tool.


2

There is a considerable difference between the core plugin, fTools, in version 1.7.4 and latest (1.8 RC, or 1.9 master branch). I'm guessing the new version is not quite ready for release, as its __init__.py file has not been updated beyond the same 0.6.1 version. However, I was able to do a quick fix to get this function of the plugin to work in 1.7.4. ...


2

I would advise against celenius' suggestion (with respect) for the very reason he mentions plus the 'interesting' results you can get in some systems where some rasters have NoData (NoData is not the same thing as zero). Use the merge tool provided (its a lot easier and safer): Raster->miscelaneous->merge This essentially does the same thing as the GDAL ...


2

The shapefile specification does not allow you to mix different types of shape in a single shapefile. I've never heard of geomerge but it probably shouldn't allow you to do that as the end file won't be usable. If you need all five files in a single WMS layer for some reason then look at layergroups instead.


2

Take this answers based on the tools themselves and not an actual benchmark: The merge tool creates a new feature class, which takes time in itself, before it crams together the two datasets. The append tool with the TEST option assumes that both datasets have the same fields (field names) and crams them together without having to create a new feature ...


2

You can accomplish this using this python script, here is the syntax: import arcpy from arcpy import env env.workspace = "C:\\temp\\test.gdb" fcList = arcpy.ListFeatureClasses('','') arcpy.Merge_management(fcList, "Merge") Just change the env workspace to match your geodatabase path.


2

This can be done easily in QGIS. The operation you are looking for is called dissolving. You can find the dissolve tool from Vector menu -> Geoprosessing tools -> Dissolve. You just have to define the field that contains the first part of the postal code. If this kind of field doesn't exist you can create one using field calulator.


2

From my understanding of the question, you want to: 1) Overlay the contour lines you have already created onto the satellite imagery. 2) Clip out a section of the imagery. If you are only concerned with a true-color image (RGB) and you don't need to actively change the bands (e.g. to create a false color composite) you might consider converting your ...


2

If you exported the oid, fid or some other unique identification field. Then I would do a join back to that field. Then if you need to add a new field (actually create prior to the join) and calculate the join value to the fc. Note that if you edit/split/delete features after the csv export the oid can change. The csv will be on the end of the attribute ...


2

I guess "easiest" depends on what the "merging" process requirement is. If you're doing a straight format conversion, then ogr2ogr (as suggested by klewis) is an easy, scriptable approach. If you want to do some more manipulation (e.g. exclude some entries, reproject, select some additional data from another table), then "easiest" will probably depend on ...


2

In ArcGIS you can use an edgematching process from the Spatial Adjustment toolbar: The edgematching process aligns features along the edge of one layer to features of an adjoining layer. It is mainly used when you want to merge separate adjacent layers, such as soils or contours sheets, and you need to ensure the features from those layers will ...


2

See the similar post here how-to-merge-many-shapefiles-in-different-folders, but there are many, many ways to do this, so use what works best for your data. The ArcGIS Desktop Help file on Listing data shows how you can use a wildcard to list feature classes in a workspace: arcpy.ListFeatureClasses(wildcard, feature_type). An added bonus is that you can ...



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