Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Can't set unit of imported shapefile

Can't set unit of imported shapefile 2 weeks 6 days ago #44518

  • nicogodet
  • nicogodet's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 127
  • Thank you received: 31
Hi,

I import a shapefile polygon with "density" attribut.
Created i2s has no unit set for the density attribut.

Using provided T3D.zip, create a new T3 Mesh Generator, set "preemp.i2s" as outline, import densi.shp and use generated i2s as density in T3 Mesh Generator.

On "Run" in T3 Mesh Generator, Info window does not detect the correct minimum cell size (it should be 1). Click "YES" and se it does nothing and fails to generate mesh.
Attachments:
The administrator has disabled public write access.

Can't set unit of imported shapefile 2 weeks 6 days ago #44519

  • nicogodet
  • nicogodet's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 127
  • Thank you received: 31
A workaround is to save the generated i2s, edit the i2s header and add ":AttributeUnits 2 m" (where 2 is the attribut number) and re-import it in BK.

Note: it was not an issue in older versions (like 3.3.4).
The administrator has disabled public write access.

Can't set unit of imported shapefile 2 weeks 4 days ago #44531

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 522
  • Thank you received: 138
Thanks for reporting the fault in BK 3.12.13-alpha

> Note: it was not an issue in older versions (like 3.3.4).
FYI: There have been thousands of changes to the code since 3.3.4, which was released a decade ago. So I would expect there to be some differences.

Kindly,
Alan
The administrator has disabled public write access.

Can't set unit of imported shapefile 2 weeks 4 days ago #44535

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 522
  • Thank you received: 138
> Note: it was not an issue in older versions (like 3.3.4).

I have looked at the code as of 14 January 2015 (i.e. version 3.3.4) and compared the unit handling since that time. There are 22 code revisions and none have changed the behaviour from what it was.

It seems that BK was never able to import units from a shape file. To be more specific, the *.dbf file is read and it contains information about attribute types (such as float, integer, etc.) but there is no handling of units.

If you believe that one of the files associated with the *.shp file contains unit information, then please point me to where it is located and I can come back to revisit this issue for you.

Side note: A new feature for BK would be to allow changing the current attribute's units. Internally, this is easy to accomplish now that thousands of changes have been made over the years. I'll add something to the next release for this...

Kindly,
Alan
The administrator has disabled public write access.

Can't set unit of imported shapefile 2 weeks 4 days ago #44536

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 522
  • Thank you received: 138
> On "Run" in T3 Mesh Generator, Info window does not detect the correct minimum cell size (it should be 1)

Run seems to be ok? Perhaps you are using different options?

Kindly,
Alan


2024-04-11_Example.png
The administrator has disabled public write access.

Can't set unit of imported shapefile 2 weeks 4 days ago #44537

  • Serrer
  • Serrer's Avatar
  • OFFLINE
  • Moderator
  • Posts: 700
  • Thank you received: 296
Hi all,

Two things...

1. There are/were no provisions for storing "attribute units" in a shape file (as defined by ESRI) when the EnSimCore was designed. One of the reasons for defining all our own file types was a frustration with the incompleteness/inconsistency of "industry standard" GIS and Hydronumerical files at the time. I suspect not much has changed in the intervening 20 years.

2. "Default Edge Length" is NOT the same as "Minimum Edge Length".
- The "Default Edge Length" value is used by the node placing algorithm in the absence of coverage by the "Density Object" in some area within the outline.
- "Mimimum Edge Length" is estimated from all inputs provided to the Mesher.


Now, on to running the Mesher...

As Alan points out, the dialog shows that the detected "Minimum Edge Length" is indeed 1. Your density object contains 2 density polygons one having a value 1 and the other having a vaue of 8. So I see no problem.

What do you mean when you say that the Mesher fails?
Is there an error message?

I will note that "as specified" the mesher WILL take a LONG time to run.
You have asked for a final mesh that contains approximately 3.25 Million nodes. That's quite a lot.

Hope this helps... Martin
The administrator has disabled public write access.

Can't set unit of imported shapefile 2 weeks 3 days ago #44540

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 522
  • Thank you received: 138
Thanks for the clarifications Martin.

Further to mesh generation; with your outline and without your density object, a mesh can be created.

Kindly,
Alan
The administrator has disabled public write access.

Can't set unit of imported shapefile 2 weeks 3 days ago #44541

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 522
  • Thank you received: 138
Including the picture (was too large for last post)

2024-04-12_WithoutDensity.png
The administrator has disabled public write access.

Can't set unit of imported shapefile 2 weeks 3 days ago #44544

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 522
  • Thank you received: 138
Internally BK is performing a divide by 0; causing an internal variable called "startAngle" to be computed as -1.#IND

I will investigate how to fix this fault.

Kindly,
Alan
The administrator has disabled public write access.

Can't set unit of imported shapefile 2 weeks 18 hours ago #44554

  • nicogodet
  • nicogodet's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 127
  • Thank you received: 31
Hello Alan and Martin,

First, I would like to say that I'm not angry or fustrated. English is not my native language and my message might have been misinterpreted. Sorry about that.



What I meant by "it was not an issue in older versions (like 3.3.4)." is that even with a unit set, T3 mesh detected the minimum cell size correctly. Not that we had the possibility to manualy set a unit or import it from a shp (which is not possible as said by Martin and I agree).

I retried with the exact same dataset as I provided here and here is the message box when I run the T3 mesh.


Minimum cell size is not 1.


As a side note
I will note that "as specified" the mesher WILL take a LONG time to run.
You have asked for a final mesh that contains approximately 3.25 Million nodes. That's quite a lot.
It tooks 20 seconds (with a submesh and constraint lines) on 32core AMD Threadripper. That's impressive !

Regards,
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: Serrer, a.barton

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.