You don't need to parse WKT before making a shape from it (though it will actually work):
COORDREF_XY -400,-400,1000000 COORDSYS GCS_WGS_1984 EFLAGS "na+" DELIMITERS "\t" SKIP 1 COLUMNS OBJECTID Int32 - 10 N # $WKT String - 32767 N # Shape AsShape($WKT,WKT) - 32 Y SHAPE WKTShape - 1000 Y END
Assmptions:
1) You are using a 10.x ArcGIS install (or at least something after 9.1, so that HIGH precision coordinate references are in use)
2) You have a tab between the objectid and well-known text (the default delimiters set includes a comma, which messes up WKT). There are other ways to parse the line if the objectid is space delimited from WKT.
3) The geometry doesn't exceed 1000 kilobytes (1024000 bytes) -- the maximum is 32767k (all BLOB, CLOB, XML, and Shape columns are in kilobyte units)
I have a similar problem and so I thought I would take Vince's advice and see if I could isolate the baddies using ascinfo.
I dumped my SQL geometry into a flat file
2 POLYGON ((120.258097207178 -28.8259932764729, 120.266262438367 -28.8253653184617, 120.271354650676 -28.8315606240709, 120.271588304722 -28.8377220084302, 120.26499880165 -28.8385718603031, 120.258097207178 -28.8259932764729))3 POLYGON ((120.271354650676 -28.8315606240709, 120.277827541831 -28.8300055765609, 120.282974908246 -28.8436300321902, 120.276499614822 -28.8451858541119, 120.271588304722 -28.8377220084302, 120.271354650676 -28.8315606240709))
etc
I then setup a CTL file in various combinations, but I could not get the syntax correct. The current sticking point is how to specify that input is polygons.
..\jc.ctl: Class 'GeoArea' not found (line 10)..\jc.ctl: Class 'GeoPolygon' not found (line 11)..\jc.ctl: Class 'GeoPoly' not found (line 11)..\jc.ctl: Class 'Geopoly' not found (line 11)..\jc.ctl: Class 'GEOPOLygon' not found (line 11)..\jc.ctl: Class 'GEOPOL' not found (line 11)
COORDREF_XY -210,-120,1000000COORDSYS GCS_WGS_1984EFLAGS "np"
SKIP 1
COLUMNSOBJECTID String - 11 N$WKT String - 32767 N Shape GEOPOL($WKT) - 1 YEND
Can someone push me along a little bit?
Thanks
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.