Posts Tagged ‘data loader’

Enabling and editing z-values

Problem: You need to load a shapefile that does not have z-values into a feature class that does

Some spatial data will store height information in a normal attribute table field, but others will store it in the feature geometry as a z-value. Using z-values increases the feature geometry from 2D (x and y) to 3D (x,y and z). ArcScene will automatically display 3D data using the z-values, and it will do so more rapidly than draping the data over a surface.

Because z-values are optional, you may run into a situation where you need to merge a layer that does not have them into a layer that does. For example, say you have a geodatabase holding tree locations along neighborhood streets. The height of the trees is stored in z. Your surveyors have gone out and collected the locations of some additional trees in people’s yards, but they didn’t use 3D geometry. You need to load the new yard trees into the street tree feature class.

Right clicking and selecting properties in ArcCatalog confirms that the StreetTreePntZ feature class has z-values but the YardTree shapefile does not.

Trying to load the shapefile as-is will result in the error message.

One solution: you could run ET GeoWizards Point to PointZ conversion on the shapefile.

Another solution: Environment Settings! Import the yard tree shapefile into your geodatabase as a separate feature class. But before you press the OK button, press Environments… right next to it.

Expand General Settings and under Output has Z-Values, change Same as Input (the default) to Enabled.

Now you will be able to load the z-enabled yard tree feature class into the StreetTreePntZ feature class.

The z-values for your newly loaded features will be 0. You can edit z values in ArcMap by starting an edit session, double clicking on each feature (to turn it into a sketch) and then opening the Sketch Properties dialog from the Editor toolbar.

In the future I will write an entry about visualizing these cool 3D features in ArcScene.

Tags: , , ,

Creating an XY Domain that covers your data extent

Problem: When loading data into into a feature class, you get the error “the coordinates or measures are out of bounds”

This issue most often arises for me when I am in ArcCatalog using the simple data loader tool. It can also arise when trying to import a feature class into a feature dataset, when creating new features during an edit session in ArcMap, or when performing spatial adjustment to move features to a new location. In each case, the error occurs when the extent of the feature class or feature database is not large enough to contain the new or moved features. The solution would appear to be “increase the extent,” however, it is not possible to change the extent once a feature class or feature dataset has been created. You need instead to create a new one with the correct extent. I will show you how to do that, returning to the example of the Oceanic layers I used in my post about preparing layers for merging with model builder.

Today, I would like to merge all my city point shapefiles into one feature class in my master Oceanic geodatabase. I have city points for Australia and Papua New Guinea. If I merely import the Australia shapefile as a feature class, and then attempt to load the Papua New Guinea points into that feature class, I will get this error message:

One of the points is out of bounds! By displaying the layers in ArcMap, it’s easy to see what happened. When I imported the Australia shapefile, the spatial domain was defined as the extent of that layer. The one Papua New Guinea point that didn’t get loaded fell too far east of that domain.

A good rule of thumb is: if you have a dataset that covers your entire domain, import that first and then load the other datasets into it. However, you often won’t. In that case you are going to have to take one or two extra steps.

Single step method (good enough for most purposes):
Create a new feature class. ArcCatalog will ask you to chose the projection of the feature class, and when you do, the extent will be set to the all of the mathematically possible values in that coordinate system. In other worlds, the whole world (and then some). ArcCatalog will then allow you to chose a schema for the new feature class. Import the schema from one of the layers you are going to load in.

You will now be able to load all of your layers into the new feature class without any out of bounds errors.

Two step method (better):
Add all of your layers to ArcMap. Then draw a box around all of the features and save it as a separate polygon shapefile.

This polygon shapefile will be used to precisely set your x,y domain. In order for this to work, the projection of the layer must be set to unknown. Clear the projection if it has one defined. Now, create a new feature class in ArcCatalog. When it asks you for the projection of your new feature class, import the projection of your polygon shapefile.

If this polygon has a defined projection, ArcCatalog will just do what it did before and set the extent as all mathematically possible values in that coordinate system. But if you import an undefined projection, ArcCatalog sets the domain as the spatial extent of that dataset. That’s exactly what you want. You’ll see an additional screen that shows you this is happening and even allows you to change the x,y domain values if you want.

Here, you can see what the domain looks like if it is defined automatically by the GCS WGS84 coordinate system.

And here is what is looks like when defined by my domain polygon with an unknown coordinate system.

Why is the second way better? It is preferable to have as small a domain as possible because a smaller domain allows for a greater resolution. Resolution is the minimum distance between coordinates. A higher resolution means that locations can be placed more precisely, because their coordinate positions are allowed to have more decimal places. Because data storage is finite, there will always be a trade off between extent and resolution. In most cases, the resolution gain will not be noticeable, especially if you are using a post-9.2 high precision geodatabase. But I put it here as a best practice.

Once you have loaded all your layers into your new feature class (error free!), define its coordinate system as your last step. This feature class is totally optimized for the data it’s holding.

Tags: , , ,

Bad Behavior has blocked 83 access attempts in the last 7 days.