Transcript Metadata Into Spatial Context

Hey All,

i am working on studyproject on swamps and i want to give some Meta-Data a spatial Context. Would it be possible to seperate these information and give it a value. There is the information ;/;//;/// which contains the hight of the earth layer. And the Name e.g. og-Hn which is the substrate-typ.
Is that possible. Do i need a plug-in for that ? or is it possible to do it by good list-management. There are over thousand items so i really need to have a definition for that.

I am very gratefull for any help.

are " \ " and " / " both equally (randomly) used as separators for different depths? or do they have a particular meaning depending on how they are oriented?

also, is the " - " symbol used to define the presence of a mix of different types of substrates together at same depth?

Yes, they have different meanings:

" \ " means until 0,15m below surface,
"/ " means until 50cm,
“//” until 1 m and
“///” until 1,6 m below surface

“-” is just a part of the term of the substrate

mmmh, I see some troubles here :slight_smile:

the thing of having the very same symbol / with different meaning depending on how many times it’s used, implies the “search” must be done according to an order, where /// comes first, then //, and finally /

same thing for values like " Hn " having a meaning, then " H " having a different meaning: Hn must be searched first

could you please provide the internalized full-set value list (this)

together with a full list of symbols and their meaning?

for instance, if we replace all instances of “H” with “Torf” , it will also find an H in “og-Hn”, which will become “OG-Torfn”, so simple find and replace can’t be used directly unless very careful considerations are done first

1 Like

Conditional evaluation/analysis of strings is arguably simpler in textual programming languages. In Python you could use e.g. regular expressions, but a simple switch statement (i.e. a long if-else statement) like this one where we check if a string contains a substring will likely also do the trick (and is easier to read/understand):


210720_TranscriptMetadataIntoSpatialContext_00.gh (4.5 KB)

Update: Here’s a similar approach to extracting the type information for each string as a list (as it seams a string may include more than one type):


210720_TranscriptMetadataIntoSpatialContext_01.gh (6.9 KB)

3 Likes

Yes, there is some trouble of the changing definition of a symbol by how often it disapears. Also probalbly in my scripting skills.

So i found out there is actually no “H”.

Here is a discription of substrate layers from science of earth systematics. It is about the row of Substratsubtyp. I r

So i put the hights of the average.
There is case 1 that is quite problematic. There are some rows which contain same symbols twice: like
“”…"".

And Symbols are not seperated in general. “///” is recognized also as “/” and “//”

I might managed to integrate Case 2 with all hights.

Transcript Metadata Into Spatial Context_List.gh (1019.1 KB)