Skip to Main Content
Autodesk
Status For Review
Product InfoWorks ICM
Categories Export Data
Created by Jason Kulsdom
Created on Aug 23, 2024

Change default field name behaviour when exporting to shape file

When exporting model network data to shapefile format, the default export field names generated in the “open data export centre” are currently very awkward. The issue arises because many field names in ICM are longer than ten characters, but shapefiles are limited to ten characters for field names.

For subcatchments as an example, there are several sets of fields that, when truncated to ten characters, would result in identical field names, e.g. the “user_text_” fields, “user_number_”, “area_absolute_” and “area_percent”.

The issue is that the way the default names are generated, the suffix numbers don’t line up at all, which can cause confusion when working with the shapefile later on. E.g. for the “area_absolute_” fields:

  • “area_absolute_1” is truncated to ten characters, so ends up as “area_absol”

  • Then, “area_absolute_2” gets truncated to ten characters as well, but since this would result in an identical field name, the software instead truncates it to nine characters, and tacks a “1” onto the end, resulting in “area_abso1”

  • This pattern continues, so that “areas_absolute”s 2 to 10 end up as “area_abso”s 1 to 9, effectively offsetting the suffix numbers for each by one.

  • For area “area_absolute_11”, this pattern no longer works, since the single digit numbers are all used up, so instead, the software truncates the field to eight characters, and tacks a “01” onto the end, resulting in “area_abs01”

  • “area_absolute_12” similarly ends up as “area_abs02”

While I do understand the logic at work here, the results are very messy, with the original 1 to 12 sequence becoming “blank”, 1 to 9 (but offset), then 01 and 02. So this Idea is to suggest something be done to get the default names to work better. Maybe a special exception could be added to the code for generating field names, specifically for fields longer than 10 characters that end in number. If there are nine or less numbered fields, the default name would be truncated to nine characters, and the “correct” number could be added at the end. For series of fields where there are ten or more, you would need to truncate them to eight, then add the “correct” number at the end. Or maybe just universally for all fields where the last character is a number, then the default name would consist of the first eight characters, followed by the last two characters. There are a few ways this could be improved, and presumably it would take minimal coding work by your developers.

  • Attach files