AWLRS: export is showing error: OGR Error. Attempt to write feature failed.


 Product(s):AWLRS
 Version(s):1.2.x.x
 Environment:N/A
 Area:Other
 Subarea:N/A

Error or Warning Message

A user cannot export some layers to shapefile. Please see below the error message

.

How to Avoid

It looks like some assets have incorrect geometry type records. You can find it using steps below:

 

  1. in Exor form go to Launchpad>exor>GIS Data>GIS Layer Tool, click on Asset Layer under Asset Manager, in Asset tab chose the exported asset type and click on "Get Themes" button and note the name of spatial table.

  2. By running script below make sure that spatial table contains different geometry type records. Do not forget to change the table_name to the name of spatial table from step 1.

    select s.geoloc.sdo_gtype, count(*) from table_name s
    group by s.geoloc.sdo_gtype;

  3. If step 2 came back with more that one entry. Then most probably one of these records has geometry type value -point 3301. The following script will help to find such entries

    select * from table_name t
    where t.ne_id in (select i.ne_id from table_name i where i.geoloc.sdo_gtype=3301)
    order by t.ne_id
     

See Also

 Original Author:NT