Am trying to add a second Geometry column to a feature class. I know Arc applications won't know about this field -- and I would not want them to -- but the field would be added to support custom functionality. The basic process of creating a field of Field Type Geometry and adding it to the feature class just fails. Have tried adding a blob field and storing a Geometry into it errors as well, though I haven't gone very far down this path.
I realize I could create another feature class with a relationship to the first, but want to avoid this if possible.
Any pointers on a preferred method that's been found to work would be much appreciated.
Thanks,
Ed
What about using a text field and store "WKT" Well Known Text to describe the geometry? Many other medium to large format database can read and interpret WKT. I use this in SQL server for custom geometry analysis/manipulation.
Just the first thought that came to me when I read your post.
Ted -
Thanks much for the suggestion. As I looked back further into the code I
was using to add the geometry field I realized I wasn't setting a geometry
definition for the new geometry field I was trying to add. Once I created
a new geometry def and assigned it to the new geometry field I was able to
add the field without error. (code below)
Thanks again for your suggestion. I'm sure that would work as well.
Ed
Ed,
Hi - I was looking to do something similar and found this topic, but didn't see the code you mentioned. Any chance you still have it or could send it? I'm trying to update an FC from an older geometry to ST and was trying to add a second shape field.
Ted -
Have to add an additional point to this thread. What I had hoped to do
was add a line geometry field to what was otherwise a point feature class.
I find when I do this the class shape type also gets changed from point to
line... which is not what I hoped.
Anyway, am reverting to your method of the text WKT field, which seems to
be working OK so far.
Thanks much!
Ed
I am glad you are making progress!
No workaround is perfect (each comes with its own set problems). WKT allows you to mix geometries and can handle most of the basic types spatial queries; however, doing any real complex types of spatial queries will eventually mean you will have to develop your own spatial programs to perform them with WKT especially if you are using mix geometries.