Jump to content
TUFLOW Forum
aberry

1D import

Recommended Posts

Hi all,

I have been using Tuflow/MapInfo for quite some time and generally using queries etc to refine Council drainage networks to align to headers required and bring in the 1D components.  However new to using QGIS now and having trouble finding a way to do the same.  How does everyone else do it, through an external method or within QGIS itself, any tips?

Thanks

Adam

Share this post


Link to post
Share on other sites

Hi Adam,

Are you able to clarify what it is you are trying to do?  Is it to take an asset database and convert it into a 1d_nwk format?

Cheers

Phil

Share this post


Link to post
Share on other sites

Sorry Phil didn't get a prompt for your reply!! 

Yes it was converting over database to Tuflow format, ive got a workaround now just through excel with a couple of formulas, but just out of curiosity is there an easier (read faster) way? 

Share this post


Link to post
Share on other sites

Hi Adam,

 

I know this is a while ago but I thought I'd share what we're using here.

The 'Refractor Fields' functionality in QGIS has been really helpful for bulk editing of tables. I'm not sure if you're using a database or just a layer. This example will only work for a layer. Unfortunately I've not been able to find much documentation on the tool, so what I know is mostly from experimentation.See below for an example.

I've loaded up an exiting table that I have called 06_PropertyCounts_LBWF_COM_EXG_002_AOI.

QGIS has filled out the table below with the existing fields that I have in there (legend etc). I'm going to transform this table using the things that I pop into the expression box.

In the first line, the 'Legend' field is going to stay the same, so in the expression box I keep the name the same (I.e. it will map to itself). In the second box I'm making a field called Toid, and its value will be the 'Version' field times 1.2. In the new version field, I'm setting it all to the value of 7. Finally, in the FC field, I'm using the area of the shape.

It's essentially a way to bulk transform tables and we use it a lot to move things into a TUFLOW format. 

The best bit - if you do this a lot on similar tables you can save your field mapping as a template and batch process this. Magic.

I hope that helps.

Please let me know if you want more information.

 

 

Rach

refactor_Eg.PNG

Share this post


Link to post
Share on other sites

Hi Adam, 

There's a little more info on refactoring on our Wiki:
https://wiki.tuflow.com/index.php?title=QGIS_Change_Attribute_Type

https://wiki.tuflow.com/index.php?title=MI_Change_Attribute_Type

https://wiki.tuflow.com/index.php?title=Arc_Change_Attribute_Type  (Note: At present this has only been configured to change to string type from another data type.)

Hopefully this helps out also. For the last two, you could try adding them to a processing or modelling toolbox to sequence and automate your tasks. 

Cheers, Mitch.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...