Hot answers tagged gdb
20
At a high level the way I choose is based on whether users are inexperienced and need nothing more than points, lines and polygons. Shapefiles are ideal for this.
If they need annotation, domains for pick lists and validation, raster, etc then use File Geodatabases which are easy to use, fast and can be massive in size.
I would never use Personal ...
8
In Addtion to saving defined layer styles within project files on the network, you can create a single Spatialite enabled database.sqlite, if your workflow isn't too busy.
For myself, I've replicated a fgdb by importing a hundred shapefiles and a couple hundred datatables, with great performance. Spatialite won't allow for PostGIS or FileGDB style ...
7
Code
If the layer is a shapefile, Layer.datasetName will return the file name.
Please read the documentation in the following link to help you understand more about the datasetName parameter of the Layer object:
dataSource (Read Only) : Returns the complete path for the layer's data source. It includes the workspacePath and the datasetName properties ...
7
You can achieve this by preparing all those layers in one (or more) project files. Share these projects on the network and you can load them using Layer - Embed Layers and Groups.
If you want to change anything in these layers, open the original project file and changes will appear in all projects that contain embedded layers.
7
If the FileGDB driver for GDAL/OGR didn't work (and that's what I suspect from your question), then unfortunately I suspect that the GDB format is <10.0 and locked from the open source world.
Esri software is required to open old GDB files. Even Safe's FME requires ArcObjects.
If you can, ask the data provider to provide an unrestricted file format, ...
6
I try to avoid using shapefiles as you cannot store domains, relationships, aliases etc. but they are the most portable format when distributing data to other people who are using different GIS systems/tools.
Whilst file geodatabases give better performance and are capable of storing huge datasets, everyone above is giving the humble personal geodatabase a ...
6
The following code is used to List Workspaces, in this case, File Geodatabases. It does not check for the file extension .gdb, but is looking for its internal type. This should leave out directories with a .gdb extension, but which are not actually File GDB's.
import arcpy
arcpy.env.workspace = "C:/Data"
# List all file geodatabases in the current ...
6
This may help to find the created date: How to get file creation & modification date/times in Python?
You'll probably want to read up on the os.path and datetime modules and string formatting in Python (new or old styles).
Here is a small example to hopefully get you going:
import os, datetime
fc = r"C:\GISData\atlantic_hurricanes_2000.shp"
ctime = ...
5
Please have a look at the Copy Rows geoprocessing tool.
The code can be as simple as the following:
import arcpy
arcpy.CopyRows_management("C:/data/vegtable.csv", "C:/output/output.gdb/vegtable")
5
This message:
During translation, some features were read that did not match a
reader feature type in the workspace. This can happen if the reader
dataset is changed, or a reader feature type removed or renamed.
...should have nothing to do with how the data is written, just what is read. This FME Evangelist post should explain that part of the ...
5
I generally use FGDBs, but it really depends on what you need to store. Like the other posts have mentioned, Personal GDBs are outdated and have size issues.
Using a geodatabase allows you to set up a topology, which you can't do with plain shapefiles.
Shapefiles hold the exact coordinates of the shapes. In a GDB, the locations are snapped to the nearest ...
4
If you are using FME to do the data load, I think you may as well use it to read the original table and do the transformation stage. Then it's all in one process. If you do the work in Workbench then there are transformers for parsing, trimming, and concatenating.
I won't say this is the best way, or compare it to any others, because I currently work for ...
4
Most people would recommend storing your data in a database for performance reasons, i.e quick to query and search. However I believe there is also the benefit of currency when data is in a database. For example, if you pass a shapefile to a colleague they are likely to use that indefinitely but the data may have been updated. Where as if the data was stored ...
3
Yes! Open your OSGeo4W downloader, select advance setup, and then select gdal-filegdb under the libs tree.
There's a step-by-step tutorial here: How to get ".GDB" (Esri File Geodatabase) support in Quantum GIS (osgeo4w - qgis)
Please note that the FileGDB API Does not support Raster Images.
3
You need to understand the CAD file format (DWG have many variants) and going to a folder based format (File Geodatabase).
Note: ArcGIS does need to be installed for conversion to ESRI Geodatabase formats. [But not shapefiles]
Here is a video from Safe Software last week [22nd November 2011] CAD to GIS formats
...
2
if you want full-blown geodatabase capability (Coded Value Domains, Relationship Classes, Topologies, Geometric Networks, etc blah blah, without the complexity or admin overhead of relational geodatabase, AND/OR you want the fastest drawing, cursor, and geoprocessing performance, File Geodatabase is the way to go. Local disc access is much faster than a ...
2
Since all your tasks are geoprocessing tasks you could just create a model and export out the model to either a vb, python, or jscript. Below is an example of a vbs script. You can then call the script with a macro or UI Control.
Dim gp As object
' Create the Geoprocessor object
set gp = CreateObject("esriGeoprocessing.GPDispatch.1")
' Check out any ...
2
This ArcGIS help for Setting the Default Geodatabase might be what you are looking for. I believe the "Default" is something that has to be set upon each map document's creation. After that, it should be accessible through the settings in the MXD. I'm away from my station so I can't confirm the exact toolbar rigamarole.
However it should be noted that ...
1
Where @Get Spatial's answer is partially correct, but it doesn't solve the problem directly. So answering my own question:
desc = arcpy.Describe(filePath)
print desc.dataType
It prints the type of the object given path is directing. For folders, it prints Folder and for geodatabases it prints Workspace
1
As Get Spatial suggested, it was indeed a problem with the created features being added to the Table of Contents, for I had checked the "add to display" option in one of the tools that I made to create the files.
Once I unchecked that option, the files were created in their respective file GDB without being added to the ToC, making the deletion of said GDBs ...
1
Take a look at using the in_memory workspace in Modelbuilder rather than creating temporary GDBs.
From:
http://resources.arcgis.com/en/help/main/10.1/index.html#/Using_in_memory_workspace/002w0000005s000000/
"Data written to the in-memory workspace is temporary and will be deleted when the application is closed."
However, depending on the size/intensity ...
1
I think what you need to do is create the attribute fields (as User Attributes) in your target and then, if the target/source attributes are not named identically, you may have to explicitly map the source attributes to those new target User Attributes.
If you have a lot of attributes, you can also import attribute fields from the Writers menu:
Only top voted, non community-wiki answers of a minimum length are eligible



