Global Mapper v25.0

What's the Optimal Procedure For Data Mining Extractions?

kbellis
kbellis Global Mapper UserTrusted User
edited October 2013 in Technical Support


abutters 01.PNG
Parcels which relate to the subject property chosen using the Digitizer Tool.
Say you have parcel layer and a joined table of tax records, and you want to export all of the tax records abutting your subject property, what is the optimal procedure extract only selected fields into a new spreadsheet?

In my fumbling attempts to finally automate (what I've done for decades "long hand"), I've started out in Global Mapper by using the Digitizer Tool, selecting just those parcels of interest, Ctrl+C (copy), Ctrl+V (paste) Paste To User Created Features Layers. This helps to isolate things a bit, but probably isn't really necessary.

Then onto the what's next? bit. An Export of all items selected seems in order, but there's so many (here's some of formats but is an incomplete list) to choose from, and really, which one(s) will offer the chance to save only selected fields (attributes) that I need in order to ultimately do a mail-merge in OpenOffice when I mail out notices to the abutters informing them of our surveying activities? And in reality, if truth be told, it isn't the attribute we're after, but rather its VALUE*

For this exercise we're only wanting certain fields:
[COLOR=#a9a9a9]DESCRIPTION=Parcel style 05 pale sandalwood
CLOSED=YES
OBJECTID=1085
TOWN=Sullivan
GEOCODE=09300
STATE_ID=930001222
MAP_BK_LOT=029-007
PARENT=
PROP_LOC=GARDEN WAY
PROPLOCNUM=3.00
GEO_LOT=09300_029-007
FMSRC=
FMSRCORG=hcpc
FMPROCSS=
FMUPDORG=umch
FMUPDAT=20101012
FMNOTE=
STAGE=2
FMSRCDAT=20070331
POLY_TYPE=
[/COLOR][B][COLOR=#4b0082]OWNER1=[/COLOR][COLOR=#ff0000]MASKE, ANN C.[/COLOR][COLOR=#4b0082]
OWN_ADDR1=[/COLOR][COLOR=#ff0000]3 GARDEN WAY[/COLOR][COLOR=#4b0082]
OWN_CITY=[/COLOR][COLOR=#ff0000]SULLIVAN[/COLOR][COLOR=#4b0082]
OWN_STATE=[/COLOR][COLOR=#ff0000]ME[/COLOR][COLOR=#4b0082]
OWN_ZIP=[/COLOR][COLOR=#ff0000]04664[/COLOR][/B][COLOR=#a9a9a9]
LS_PRICE=0.00
LS_BOOK=B2140
LS_PAGE=P345
LAND_VAL=90900.00
BLDG_VAL=137200.00
LIV_UNITS=0.00
LOT_SIZE=4.50
SIZE_UNITS=A
BLDG_SIZE=0.00
LAND_USE=0.00
YEAR_CREAT=0.00
RES_AREA=0.00[/COLOR]




abutters-03.png

abutters 02.PNG
So... for fumbling starters, let's go with Simple ASCII - I love simple, or at least the idea of something being simple ... which it rarely turns out to be.

The file that's produced contains exactly the information that's desired (yea!)... but extracting it from amongst the over 4,000 lines of the undesired information will need to be dealt with if Global Mapper doesn't already offer a secret way of exporting only selected VALUES from selected ATTRIBUTES.

(...I feel a script comin' on, just don't see it just yet through the mist)

In the mean time: REGEX to the rescue!
... well, as a 4-day old student of regular expressions, I'm in over my head ;)
but here's a start:
regex 01
find: ^([^(^OWN.*\.?.*\n)+].*\n)+
replace: \n

This will at least start to winnow things down a bit :)

Maybe you have a better idea or maybe there's a secret sauce yet to be tasted?

Comments

  • kbellis
    kbellis Global Mapper User Trusted User
    edited October 2013
    Sorry about the screwed up formatting - this web interface VBulletin thing is extremely unforgiving with insufficient time for editing - or even deleting botched up efforts like this - very disappointing - please forgive this horrid looking thing
  • Geo
    Geo Global Mapper User Trusted User
    edited October 2013
    Hello Kelly,

    May you try this ?

    When you have chosen your geometries with ctrl+c and ctrl +v.
    Run a script with the EDIT_VECTOR command and include multiple instances of the parameter : ATTR_TO_KEEP

    GLOBAL_MAPPER_SCRIPT VERSION="1.00"
    EDIT_VECTOR \
    ATTR_TO_KEEP="OWNER1"
    ATTR_TO_KEEP="OWN_ADDR1"
    ATTR_TO_KEEP="OWN_CITY"
    ATTR_TO_KEEP="OWN_STATE"
    ATTR_TO_KEEP="OWN_ZIP"

    then "Search Vector Data", Select all, right click, Select the selected results to the clipboard as text.
  • global_mapper
    global_mapper Administrator
    edited October 2013
    Thanks Geo, that is exactly what I would suggest. I'll also note that I'm planning on adding an Attribute tab or button to at least some vector exports to allow specifying exactly which attributes to include in an export and even type/length information for exports that support that (like Shapefile).

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • kbellis
    kbellis Global Mapper User Trusted User
    edited October 2013
    Thanks guys.

    Apparently Global Mapper isn't interested in keeping multiple attributes; only the first one.

    Using the following script:
    GLOBAL_MAPPER_SCRIPT VERSION="1.00"
    EDIT_VECTOR ATTR_TO_KEEP="OWNER1" ATTR_TO_KEEP="OWN_ADDR1" \
    ATTR_TO_KEEP="OWN_CITY" ATTR_TO_KEEP="OWN_STATE" \
    ATTR_TO_KEEP="OWN_ZIP"
    

    results in:
    <Feature Name>,<Feature Type>,OWNER1,<Description>,<Index in Layer>
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"MASKE, ANN C.",Parcel style 01 pale yellow,0
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"SNOKE, DONALD D. & JANICE C.",Parcel style 01 pale yellow,1
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"HOWARD, CATHERINE P.",Parcel style 01 pale yellow,2
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"HUBER TRUST, JOSEPH W.",Parcel style 01 pale yellow,3
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"SNOKE, DONALD D. & JANICE C.",Parcel style 01 pale yellow,4
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"PREBLE, TERRANCE",Parcel style 01 pale yellow,5
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"WILLEY, JEANNE A",Parcel style 01 pale yellow,6
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"ASH, MARK & ANTHONY",Parcel style 01 pale yellow,7
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"PREBLE, CLIVE",Parcel style 01 pale yellow,8
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"DEDMON, FRANK & LARRABEE, MARNI",Parcel style 01 pale yellow,9
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"BATEY, DALE & MARGARET",Parcel style 01 pale yellow,10
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"ASH, MARK & ANTHONY",Parcel style 01 pale yellow,11
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"BATEY, DALE & MARGARET",Parcel style 01 pale yellow,12
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"SCHIEFFELIN, TIMOTHY",Parcel style 01 pale yellow,13
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"WILBUR, CHARLES A. & LOZINA M.",Parcel style 01 pale yellow,14
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"BROWN, ARLENE",Parcel style 01 pale yellow,15
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"SNOKE, DONALD D. & JANICE C.",Parcel style 01 pale yellow,16
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"SNOKE, DONALD D. & JANICE C.",Parcel style 01 pale yellow,17
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"SCHIEFFELIN, TIMOTHY P.",Parcel style 01 pale yellow,18
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"BRADLEY, ROBERT H. III, TRUSTEE",Parcel style 01 pale yellow,19
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"BIRELY, BECKY R.",Parcel style 01 pale yellow,20
    <UNNAMED FEATURE>,Parcel style 01 pale yellow,"OBER, RUTH O.",Parcel style 01 pale yellow,21
    
  • global_mapper
    global_mapper Administrator
    edited October 2013
    Your script looks ok. Can you provide the original data set so I can run and see what it isn't keeping the other attributes? I don't see any obvious problems in the code.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • kbellis
    kbellis Global Mapper User Trusted User
    edited October 2013
    Oops - I'm unsure how it happened and I'm unable to recreate the behavior by simply doing a copy/paste; but somehow the copied parcels didn't inherited the parent parcels attributes but for the one attribute: OWNER_1 ... interesting. And repeating the Vector Export, Simple ASCII didn't seem to be involved... hard telling, but worth watching.
  • kbellis
    kbellis Global Mapper User Trusted User
    edited October 2013
    <snip>...I'm planning on adding an Attribute tab or button to at least some vector exports to allow specifying exactly which attributes to include in an export and even type/length information for exports that support that (like Shapefile).

    BTW - That's a good idea :)