Survey mapfile based on point attributes

Any questions regarding the practice version are asked and answered here.
Post Reply
Nick McK
Posts: 8
Joined: Tue Dec 03, 2019 10:53 am

Survey mapfile based on point attributes

Post by Nick McK »

Morning all,

Hope this questions makes sense as it's hard to write out. Had a search of the forum but couldn't see a similar topic.

Trying to use a mapfile to map survey points based on point attributes to different string names/linetyles. For some reason the mapfile is not recognising the point and mapping it correctly though from what I can tell the string/point names and attributes are identical? Is this a matter of string vs point attributes or something else? I've seen this working in other map files to use point attributes to map data but for some reason not seeing the fix for this issue.

Sample data below. It is the "Method" attribute I am trying to use to map the data.

THANKS IN ADVANCE

The field file data looks like this

07 ELLOC 200207PA1130 151.81804260 91.26247582 23.05219491
72 Depth From Survey Point(m) 0.52
73 Survey Point Obvert
73 Method GPR

and the map file is

<item>
<key>ELLOC</key>
<attributes>
<text>
<name>Method</name>
<value>GPR</value>
</text>
</attributes>
<name>Electrical Located QL B</name>
<model>Electrical</model>
<colour>orange</colour>
<breakline>point</breakline>
<linestyle>ELECTRICITY-QL-B</linestyle>
</item>
Phil Davies
Posts: 876
Joined: Mon Jun 27, 2016 2:14 pm

Re: Survey mapfile based on point attributes

Post by Phil Davies »

The basic tab can only work off string attributes, some of the other tabs can use both string and vertex.

If you are processing SDR data there is an option that kinda, sorta, possibly and on occasions works to write the vertex attributes to the string. Anything with Att Key is string and the Vertex Att Key gives you a clue to the other.

It is on the Extra tab, but it is not documented (I have asked but got nothing, so had a play). If you set the Feature attribute mapping mode to map file and pick the same mapfile you are processing with, then sometimes it works, sometimes it doesn't and sometimes it randomly copies one or two of the required attributes.....

Having said all that, I just chain my download process to run it through an attribute manipulator to copy the attributes to the string and then back through the mapfile again.
Phil Davies
Spatial Data Manager
GMC Surveying
Phil.Davies@GMCSurveying.com
Nick McK
Posts: 8
Joined: Tue Dec 03, 2019 10:53 am

Re: Survey mapfile based on point attributes

Post by Nick McK »

Thanks Phil, been playing a bit more and have the string attribute working how I want but it's just the challenge of making it all seamless, was thinking chains would be the way to go.

I'll have a deeper look at the extras section.
Sam Cech
Posts: 4150
Joined: Fri Oct 14, 2005 12:56 pm
Location: Silverdale, NZ
Contact:

Re: Survey mapfile based on point attributes

Post by Sam Cech »

just a comment in passing

once you got string attributes sorted the
feature attribute mapping
is the way, but I could not get the mapfile to actually work
only the old file file works consistently

how it works is discussed here
viewtopic.php?f=2&t=9594
topic name : String attribute field question

that will map points that is
colour name model linestyle
based on code+attribute
on the basic section

what the mapfile does not do is shift attributes around or change them based on conditional decisions, you can only assign new ones.

for custom progresses there is the GIS post progressing, yes that is a macro that runs each time the function does

extremely powerful but requires some advanced macro writing skills... it can be tricky if what you want is say automatic trimesh generation , pick up LP code for lamp post and use attributes to size and place a trimesh that looks like the correct size pole with a lamp... or modelling 3d pits as trimeshes as you pick up points ...
manipulating attributes and creating additional features isn't hard if you can write macros.

2cents worth...
Cheers
Sam

Tatras Consulting Ltd
www.tatras.co.nz
Phil Davies
Posts: 876
Joined: Mon Jun 27, 2016 2:14 pm

Re: Survey mapfile based on point attributes

Post by Phil Davies »

Thanks Sam, the file does work but it is not the way forward, it is too cumbersome and you have to relearn it in 12 months time to make a change.

Nick I just noticed something in your mapfile

07 ELLOC 200207PA1130 151.81804260 91.26247582 23.05219491 <----- THIS IS YOUR POINT RECORD
72 Depth From Survey Point(m) 0.52 <----- THIS IS A VERTEX REAL ATTRIBUTE
73 Survey Point Obvert <------ THIS IS A VERTEX TEXT ATTRIBUTE
73 Method GPR <------ THIS IS A VERTEX TEXT ATTRIBUTE

and the map file is

<item>
<key>ELLOC</key> <------ THIS MATCHES YOUR PICKUP CODE
<attributes>
<text>
<name>Method</name> <----- THIS IS ASKING FOR A STRING ATTRIBUTE
<value>GPR</value>
</text>
</attributes>
<name>Electrical Located QL B</name> <------ THIS HAS RENAMED THE STRING FROM ELLOC TO Electrical Located QL-B
<model>Electrical</model>
<colour>orange</colour>
<breakline>point</breakline> <----- THIS SAYS THAT IT IS POINT, BECAUSE IT IS A POINT YOU CAN ADD A SYMBOL TO IT USING THE VERTEX ATTRIBUTES TO DEFINE THE REQUIRED SYMBOL. SO YOU DON"T NEED TO USE THE Method ON THE BASIC TAB, YOU CAN USE IT ON THE SYMBOLS TAB INSTEAD, BUT YOU WILL NEED TO RETHINK THE NAME
<linestyle>ELECTRICITY-QL-B</linestyle>
</item>
Phil Davies
Spatial Data Manager
GMC Surveying
Phil.Davies@GMCSurveying.com
Sam Cech
Posts: 4150
Joined: Fri Oct 14, 2005 12:56 pm
Location: Silverdale, NZ
Contact:

Re: Survey mapfile based on point attributes

Post by Sam Cech »

????
Phil Davies wrote: Wed Feb 19, 2020 1:31 pm SO YOU DON"T NEED TO USE THE Method ON THE BASIC TAB, YOU CAN USE IT ON THE SYMBOLS TAB INSTEAD, BUT YOU WILL NEED TO RETHINK THE NAME
I thought you can only use BASIC section to change String Name or Linestyles
Nick McK wrote: Wed Feb 19, 2020 10:48 am Trying to use a mapfile to map survey points based on point attributes to different string names/linetyles.
the only possibility is to have string attributes, as the name/linestyle at the moment applies to all segments in a map file...

however, one could argue the fastest way to achieve the result is to use two codes in the field

sending code ELLOC
to go to different models

eg

code ELLGPR
name "Electrical Located QL B"
model "Electrical GPR"
(attributes and all as you had it)

code ELLOC
name "Electrical Located QL B"
model "Electrical"
(attributes and all as you had it)

keep the name the same and use vertex attributes for mapping symbols (which works for both points and lines)
Cheers
Sam

Tatras Consulting Ltd
www.tatras.co.nz
Nick McK
Posts: 8
Joined: Tue Dec 03, 2019 10:53 am

Re: Survey mapfile based on point attributes

Post by Nick McK »

Enjoying the conversation, thanks all.

I'm using the symbol part of the map file/attributes for ELLOC for other reasons and that's working fine.

Point coding was me just playing around with the map files trying things out. Was just messing with every setting to see what if anything changes. Confirmed now it is vertex/string attribute issue which I'm looking for a way to resolve.

Yes additional codes makes things simple in the office but not so simple in the field though it may be the solution.

Once again appreciate the help, long time 12d user but only recently sinking my teeth into the deeper layers.
Peter Murray
Posts: 67
Joined: Fri Oct 21, 2005 8:24 am
Location: Brisbane

Re: Survey mapfile based on point attributes

Post by Peter Murray »

I am pretty sure I recognise this .mapfile and there is a bit more to the story about how this is supposed to work. The stringname ELLOC appears twice in the .mapfile
and is mapped to a point or line by the attribute 'Survey Attributes/Point-Line'. The attribute is promoted from vertex level to string level during the reduction process. If the string attribute 'Survey Attributes/Point-Line' does not exist the string is mapped to a catch all model UNMAPPED

Code: Select all

      <item>
        <key>EL LOC</key>
        <attributes>
          <group>
            <name>Survey Attributes</name>
            <attributes>
              <text>
                <name>Point-Line</name>
                <value>POINT</value>
              </text>
            </attributes>
          </group>
        </attributes>
        <name>EL LOC</name>
        <model>EL LOCATED</model>
        <colour>orange</colour>
        <breakline>point</breakline>
        <linestyle>0</linestyle>
        <comment>SERVICE LOCATED ELECTICITY - Point</comment>
        <group>Survey/Electricity</group>
      </item>
      <item>
        <key>EL LOC</key>
        <attributes>
          <group>
            <name>Survey Attributes</name>
            <attributes>
              <text>
                <name>Point-Line</name>
                <value>LINE</value>
              </text>
            </attributes>
          </group>
        </attributes>
        <name>EL LOC</name>
        <model>EL LOCATED</model>
        <colour>orange</colour>
        <breakline>line</breakline>
        <linestyle>ELECTRICITY</linestyle>
        <comment>SERVICE LOCATED ELECTICITY - Line</comment>
        <group>Survey/Electricity</group>
      </item>
      <item>
If the string has the attribute 'Survey Attributes/Point-Line' set to POINT the string has a POINT symbol applied to the point by the symbol mapping

Code: Select all

      <item>
        <key>EL LOC</key>
        <vertex_attributes>
          <group>
            <name>Survey Attributes</name>
            <attributes>
              <text>
                <name>Point-Line</name>
                <value>POINT</value>
              </text>
            </attributes>
          </group>
        </vertex_attributes>
        <symbol_data>
          <style>POINT</style>
          <size>.5</size>
          <offset>0.0</offset>
          <raise>0.0</raise>
        </symbol_data>
        <hide>0</hide>
        <comment>EL Service Located Point</comment>
      </item>
Further processes add a bit of text to the point.

If you are interested the .12fdfieldcodes definition for this code is

Code: Select all

        <feature>
          <prompt>EL LOC - ELECT S/L</prompt>
          <output>EL LOC</output>
          <message>String located underground service, record appropriate attributes. Feature set non tinnable by mapping file.</message>
          <footer><![CDATA[//CodeDescription {SERVICE LOCATED ELECTICITY}
          <id>333</id>
          <choice_attribute>
            <id>334</id>
            <prompt>Point-Line</prompt>
            <output>Survey Attributes/Point-Line</output>
            <optional>false</optional>
            <default>POINT</default>
            <data>
              <item>LINE</item>
              <item>POINT</item>
            </data>
            <allow_arbitrary>false</allow_arbitrary>
          </choice_attribute>
          <choice_attribute>
            <id>335</id>
            <prompt>Pickup_Method</prompt>
            <output>Survey Attributes/Pickup_Method</output>
            <optional>false</optional>
            <default>CABLE LOC 2D</default>
            <data>
              <item>CABLE LOC 2D</item>
              <item>CABLE LOC 3D</item>
              <item>DBYD</item>
              <item>EXPOSED</item>
              <item>GPR</item>
              <item>POTHOLED</item>
              <item>POTHOLE_BACKFILL</item>
              <item>NON_STD</item>
            </data>
            <allow_arbitrary>false</allow_arbitrary>
          </choice_attribute>
          <choice_attribute>
            <id>336</id>
            <prompt>Pickup_Loc</prompt>
            <output>Survey Attributes/Pickup_Loc</output>
            <optional>false</optional>
            <default>GROUND_SURFACE</default>
            <data>
              <item>BARRIER_TAPE</item>
              <item>BOTTOM</item>
              <item>CENTRE</item>
              <item>CROWN</item>
              <item>GROUND_SURFACE</item>
              <item>INVERT</item>
              <item>OBVERT</item>
              <item>NON_STD</item>
            </data>
            <allow_arbitrary>false</allow_arbitrary>
          </choice_attribute>
          <real_attribute>
            <id>337</id>
            <prompt>Depth</prompt>
            <output>Survey Attributes/Depth</output>
            <optional>false</optional>
          </real_attribute>
          <choice_attribute>
            <id>338</id>
            <prompt>Status</prompt>
            <output>Survey Attributes/Status</output>
            <default>UNKNOWN</default>
            <data>
              <item>IN_SERVICE</item>
              <item>OUT_SERVICE</item>
              <item>UNKNOWN</item>
              <item>NON_STD</item>
            </data>
            <allow_arbitrary>false</allow_arbitrary>
          </choice_attribute>
          <choice_attribute>
            <id>339</id>
            <prompt>Type</prompt>
            <output>Survey Attributes/Type</output>
            <default>UNKNOWN</default>
            <data>
              <item>HIGH</item>
              <item>LOW</item>
              <item>UNKNOWN</item>
              <item>NON_STD</item>
            </data>
            <allow_arbitrary>false</allow_arbitrary>
          </choice_attribute>
          <choice_attribute>
            <id>340</id>
            <prompt>Material</prompt>
            <output>Survey Attributes/Material</output>
            <default>UNKNOWN</default>
            <data>
              <item>METAL</item>
              <item>PLASTIC</item>
              <item>PVC</item>
              <item>UNKNOWN</item>
              <item>NON_STD</item>
            </data>
            <allow_arbitrary>false</allow_arbitrary>
          </choice_attribute>
          <text_attribute>
            <id>341</id>
            <prompt>Owner</prompt>
            <output>Survey Attributes/Owner</output>
            <default>UNKNOWN</default>
          </text_attribute>
          <real_attribute>
            <id>342</id>
            <prompt>Diameter</prompt>
            <output>Survey Attributes/Diameter</output>
          </real_attribute>
          <text_attribute>
            <id>343</id>
            <prompt>Layout (RxC)</prompt>
            <output>Survey Attributes/Layout (RxC)</output>
          </text_attribute>
          <text_attribute>
            <id>344</id>
            <prompt>Comment</prompt>
            <output>Survey Attributes/Comment</output>
          </text_attribute>
          <text_attribute>
            <id>345</id>
            <prompt>Comment2</prompt>
            <output>Survey Attributes/Comment2</output>
          </text_attribute>
          <text_attribute>
            <id>346</id>
            <prompt>Comment3</prompt>
            <output>Survey Attributes/Comment3</output>
          </text_attribute>
          <text_attribute>
            <id>347</id>
            <prompt>SUI</prompt>
            <output>Survey Attributes/SUI</output>
            <optional>false</optional>
            <default>EHV</default>
          </text_attribute>
          <text_attribute>
            <id>348</id>
            <prompt>PHOTO</prompt>
            <output>Survey Attributes/Photo</output>
            <optional>false</optional>
            <default>YES</default>
          </text_attribute>
        </feature>
     
Richard Mitchell
Posts: 216
Joined: Tue Apr 22, 2014 11:52 am
Location: Melbourne

Re: Survey mapfile based on point attributes

Post by Richard Mitchell »

Hi Nick.
Have you tried the attribute manipulator to fix your point problems?
Can set it up and then run in a chain like the mapfile. A little tedious to setup but it seems this may replace mapfiles soon. Also good to catch all items in a filter from the panel window to apply rules to.
I copied and pasted from your OP to create the four lines in the image.
Below is the text code:

Code: Select all

<Rules>
  <Rule>
    <Attribute_To_Use>
      <Vertex_Attribute_Rule>
        <Name>Method</Name>
        <Evaluate_Default>true</Evaluate_Default>
        <Expected_Type>Unknown</Expected_Type>
        <Delimeter/>
        <Index>1</Index>
      </Vertex_Attribute_Rule>
    </Attribute_To_Use>
    <Attribute_To_Modify>
      <Property_Rule>
        <Name/>
        <Default_Value>Electrical Located QL B</Default_Value>
        <Evaluate_Default>true</Evaluate_Default>
        <Property_Type>0</Property_Type>
      </Property_Rule>
    </Attribute_To_Modify>
    <Active>1</Active>
    <Comment/>
  </Rule>
  <Rule>
    <Attribute_To_Use>
      <Vertex_Attribute_Rule>
        <Name>Method</Name>
        <Evaluate_Default>true</Evaluate_Default>
        <Expected_Type>Unknown</Expected_Type>
        <Delimeter/>
        <Index>1</Index>
      </Vertex_Attribute_Rule>
    </Attribute_To_Use>
    <Attribute_To_Modify>
      <Property_Rule>
        <Name/>
        <Default_Value>Electrical</Default_Value>
        <Evaluate_Default>true</Evaluate_Default>
        <Property_Type>27</Property_Type>
      </Property_Rule>
    </Attribute_To_Modify>
    <Active>1</Active>
    <Comment/>
  </Rule>
  <Rule>
    <Attribute_To_Use>
      <Vertex_Attribute_Rule>
        <Name>Method</Name>
        <Evaluate_Default>true</Evaluate_Default>
        <Expected_Type>Unknown</Expected_Type>
        <Delimeter/>
        <Index>1</Index>
      </Vertex_Attribute_Rule>
    </Attribute_To_Use>
    <Attribute_To_Modify>
      <Property_Rule>
        <Name/>
        <Default_Value>orange</Default_Value>
        <Evaluate_Default>true</Evaluate_Default>
        <Property_Type>1</Property_Type>
      </Property_Rule>
    </Attribute_To_Modify>
    <Active>1</Active>
    <Comment/>
  </Rule>
  <Rule>
    <Attribute_To_Use>
      <Vertex_Attribute_Rule>
        <Name>Method</Name>
        <Evaluate_Default>true</Evaluate_Default>
        <Expected_Type>Unknown</Expected_Type>
        <Delimeter/>
        <Index>1</Index>
      </Vertex_Attribute_Rule>
    </Attribute_To_Use>
    <Attribute_To_Modify>
      <Property_Rule>
        <Name/>
        <Default_Value>ELECTRICITY-QL-B</Default_Value>
        <Evaluate_Default>true</Evaluate_Default>
        <Property_Type>3</Property_Type>
      </Property_Rule>
    </Attribute_To_Modify>
    <Active>1</Active>
    <Comment/>
  </Rule>
</Rules>
Attachments
Att manipulator.JPG
Att manipulator.JPG (53.24 KiB) Viewed 10076 times
RMitchell
Arup
Nick McK
Posts: 8
Joined: Tue Dec 03, 2019 10:53 am

Re: Survey mapfile based on point attributes

Post by Nick McK »

Richard Mitchell wrote: Sun Mar 08, 2020 7:54 pm Hi Nick.
Have you tried the attribute manipulator to fix your point problems?
Was just looking at those attribute editors for another purpose. Definitely something I want to explore.

Thanks
Eve Delgrosso
Posts: 10
Joined: Fri Dec 17, 2010 2:37 pm

Re: Survey mapfile based on point attributes

Post by Eve Delgrosso »

Hi Nick
Sorry about the delayed response, have only just noticed the thread...
We map points using point attributes to different NAMES in our models, so splits them out and symbolises separately.
We use grouped categories in the field and select a type to define points/lines captured. These categories are mapped into 12d using the line or point attribute and are split out.
We had major issues when we moved over to this a few years back, but Alan added a variable in the field reduction to support this.
If you want, I can show you how we work. Let me know, Eve
Post Reply