Tag Info

Hot answers tagged

12

Keeping malformed data is a bad idea, because you can never predict when and where will the failure occur. Moreover, malformed data can cause Heisenbugs, the most vicious and illusive type of bugs. I think that it is a bit pointless to discuss the possible outcome of storing invalid geometries. Having that said, The consequences can include: Wrong results ...


7

If I zoom in here... I see this: I think the issue stems from the limitation that a shapefile cannot store arcs. Instead it does a linear approximation. When a polyline intersects (what is intended to be) a circular arc at a tangent the zig zag approximation results in an intersection. I'd recommend storing the geometry in something that supports ...


6

It becomes hard to tell what is the inside and what is the outside of the polygon.


6

I am guessing you are referring to "Reserved Words" and special characters. Take a look at the following links, but ultimately reserved words and reserved characters are going to be more DATABASE (shapefile, MS Access, Oracle, SQL Server, etc) dependent vs ARCGIS dependent. ESRI KB- What characters should not be used in ArcGIS for field names and table ...


6

An 8 year old gold mine of invalid geometries is provided by the PostGIS isvalid regress tests. Many of these regression tests have been moved to GEOS, for example here and here, as well as other pockets in the tests tree. (Sorry, too many to highlight. Pick a few and paste the WKT into JTS Test builder to visualize them.)


5

There is something strange about the specification of this polygon. The first arc has parameters center (43:34:49 N 003:58:16 E) from 43:34:12 N 003:43:04 E to 43:45:45 N 003:59:56 E These have decimal coordinates {3.971111111, 43.58027778}, {3.717777778, 43.57}, and {3.998888889, 43.7625}, respectively. The Haversine formula for spherical distances ...


5

You can add validation through the use of domains. A quick tour of attribute domains


4

It's a result of the algorithms used for generating the polygons. A polygon is usually made up of multiple line segments. A list showing which polygon is on the left and right of each segment is used to determine which polygon is which. Each segment has only one entry in this list. Suppose you have a line segment which goes from point A to point B. One ...


4

You can prevent invalid geometries entering your database in the first place. For PostgreSQL/PostGIS users, this is simple to do with check constraints. For example, consider a table public.my_valid_table with a column of polygon geometries geom, use the following SQL/DDL: ALTER TABLE public.my_valid_table ADD CONSTRAINT enforce_valid_geom CHECK ...


4

I don't know about a definitive, complete list, because it depends on the DBMS, but ArcObjects and arcpy/arcgisscripting have functions for helping you write valid SQL queries and validate table/field names. ArcObjects also has DBMS-specific invalid character lists. GP methods: ValidateFieldName ValidateTableName AddFieldDelimiters ArcObjects methods: ...


3

Self-Intersecting polygons Example: SELECT isValid(geomFromEWKT('POLYGON((0 0, 1 1, 1 0, 0 1, 0 0))')); NOTICE: Self-intersection at or near point 0.5 0.5 isvalid --------- f (1 row) Problems: Wrong calculations, For example, area(): SELECT area(geomFromEWKT('POLYGON((0 0, 1 1, 1 0, 0 1, 0 0))')); area ------ 0 (1 row) This can cause zero ...


3

Zero-length segments Example: SELECT geomFromEWKT('LINESTRING(1 1, 1 1)'); geomfromewkt ------------------------------------------------------------------------------------ 0102000000020000000000000000000840000000000000104000000000000008400000000000001040 Problems: Storing zero ...


3

From personal experience you should make sure that names (1) begin with a letter, (2) contain no spaces, (3) contain 7 or fewer characters, and (4) only use alphanumeric characters.


2

You could run the Check Geometry tool (either within ArcObjects using the IGeoprocessor interface or interactively), which creates a table with a record of each invalid geometry, its OID and the type of error. You could alternatively try using the ITopologicalOperator.IsSimple or ITopologicalOperator3.IsSimpleEx properties. The former only checks whether a ...


2

There are several ways to do custom validation; if you are looking for a programmatic solution, the main ones you'll probably want to look at are geodatabase extensions and editor extensions. Alternatively, if you have ArcGIS Data Reviewer you can set up complex rules in that without programming. I am not sure if it can do everything you ask about though, ...


2

I think you are confusing an Empty String, with a NULL Value. An Empty String is a unique string of length zero. This means that there are data in the field that represent a string. That is different than a Null, which indicates that data do not exist. To test for this, try selecting a feature in the attribute table, then calculate values on the field. ...


2

Here's a stored procedure that will do it, no CLR needed, unfortunately it can't be a function because it uses TRY... CATCH... IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TestWKT]') AND type in (N'P', N'PC')) DROP PROCEDURE [dbo].[TestWKT] GO ------------------------------------------ CREATE PROCEDURE TestWKT( @wkt ...


2

Without wanting to sound harsh, I am surprised that a GIS professional has not heard of dangling nodes as this was GIS 101 for me. I presume you also know about 'undershoots' and 'overshoots', 'bow-ties or knots', 'switchbacks' and 'spaghetti digitizing'. Dangles are a big issue because they are bad topology and bad topology means your data won't perform ...


2

You don't have one polygon, you have many. It looks like the xy coords from all polygons are just dumped into one large list to make a single polygon. Hence the polygon boundary is jumping around creating bad topology. As the above commenters say, your question is poor. But, taking a guess: if you only want one polygon merge your data together prior to ...


1

If you don't have postgis 2.0 you can do this: -use qgis "check geometry validity function" find the error and correct it manually OR -import your layer in grass using qgis plugin. Grass import tool uses v.clean for cleaning an rebuilding topology, so your layer will be correct automatically. After that you have to load your new grass layer in qgis and ...


1

I get exactly the same error with a polygon that is not inside another "real" polygon, so the problem is (probably) that there is some "hidden" vertices somewhere, not that the feature is a multipolygon. Unfortunately I haven't found a way to solve the problem yet - using the node tool doesn't seem to help - but I'll be back whenever/if I find a solution ...


1

I believe you have to look for the source of data. Different software use different nodata values. Once you know that, you can QGIS--> raster calculator to set that nodata value to your desirable nodata value. If you don't have that information, you can look for outliers in a 3x3 or 5x5 window. But if you are working on built environment or values are close ...


1

Remember, too, that ESRI appends to names you give columns etc, and if you don't pay attention, you could go over the permitted width for columns, table names etc. I think 22 is the magic number on that. also, this will depend on the RDBMS you se, and each one will be different.


1

Well it displays in UDiG though whether this indicates validity I'm not sure. For any one wanting to check the WKT is: MULTIPOLYGON (((3.8441666666666667 43.48388888888889, 3.717777777777778 43.57, 3.717777777777778 43.57, 3.7175416922400166 43.57358232186896, 3.7174122630334763 43.57678917171977, 3.71736009815423 43.57999716957805, 3.717385225840569 ...



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