-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output DBF file field settings #16
Comments
Hi Roland, I think your suggestion to provide more detailed parameters for the fields is a good one, and probably makes more sense from a GIS standpoint than auto identifying type. I think many users are primarily interested in migrating geometry to GIS over additional field information so perhaps the functionality could default to text unless otherwise denoted in the field with a key like ';' semicolon as you mention. I'm not sure all users would be familiar enough with .shp data tables to set type in all instances, so some default is probably needed. The plugin used Dot.Spatial and implements fields on a FeatureSet(fs) with: I'm not sure if dot.spatial supports character length or even what data types it supports. Perhaps type specification is at users own risk? Either way this looks easy to implement and will be put on the TODO. Currently eta = infinity so pull requests on this are welcome. |
So it was pretty easy to add type specification as mentioned above, but not in as robust a fashion as I might have hoped. What I was able to get working pretty quickly is a type specification that is dependant on .net types. These do not align with dot.spatial/shp types 1:1 and it appears that dot.spatial has an internal automatic mapping of .net types, you can see my type testing below: Notice I've posted a new version to the docs for download |
Hi, thanks for making this change, I had the chance to revisit this topic now, and your changes were immensely useful! The type character length was indeed not taken into account, but that caused no problems with the proper shp model creation |
Is there a way to set for Write SHP the length and type of DBF fields? Right now it seems to output 255 characters long QStrings only, but I would need to be able to set for example 80 characters long Strings, or 10 characters long integer fields too. The other SHPExport component I have tried from Food4Rhino does this by specifying the field type like so: "Name;C;80" (name of row; type is Characters; length of input string) @nicoazel
The text was updated successfully, but these errors were encountered: