Wednesday, 15 February 2012

Arcpy Code: Find duplicate values in an ArcGIS feature class field

I'm finding coding in arcpy a little more frustrating than I would like and decided to share useful code here in case it helps anyone else trying to the same or similar things.


###########################################
# identifyduplicates.py
# Created by: Mairead de Roiste, Victoria University of Wellington
# Date: 16 Feb 2012
# What does it do?: prints to screen a list of the values that are

# duplicates in a particular field in an ArcGIS feature class
###########################################


# Import arcpy module
import arcpy

# set up variables
# the feature class you want to sort then search

fc = "D:\\ISCR_transport\\code\\data\\NZTA_workhomepoints\\workhomepoints.gdb\\workloc"

# field to sort in ascending order
fieldname = "FIRST_uniquePerson"fieldascend = fieldname + " A"

# create UpdateCursor to search through the rows, field above sorted in ascending order
rows = arcpy.SearchCursor(fc,"","","", fieldascend)

#Create an empty list
dupValuesList = []

# the code needs to be updated for the name of the field
i = -1
for row in rows:
    if i == -1: #first time around       

        value = row.FIRST_uniquePerson
        i += 1
        print value, i
    elif row.FIRST_uniquePerson != value: #if a new ID       

        value = row.FIRST_uniquePerson
        i = 0
    else:
        dupValuesList.append(value)

print dupValuesList

Thursday, 2 February 2012

Linking data to geography - the demise of privacy?


A rather grand title, but a topic which constantly comes up when I get into rather too detailed discussions with friends and random strangers at parties.

I'm woeful with names so the Whitepages Neighbors site sounds like a good idea.  They've launched an app which lists names and numbers for your neighbours overlaid on a map of your local area.  But my cynical side can already see particularly unsavoury uses for this - phoning to check if someone is at home before you break into their house.

Joining data to geographic locations, which was possible for individuals previously on a manual and labourious basis, can release a lot more information about individuals and families than they might care to make public.  The power of joining through geography is a double edged sword.

 


Tuesday, 17 January 2012

MGIS and PGDipGIS live at VUW



I’m very pleased to announce the launch this year of the collaborative Masters and Postgraduate Diploma in Geographic Information Science (MGIS/PGDipGIS) at Victoria University of Wellington (VUW).  The MGIS/PGDipGIS qualifications are jointly offered by VUW and the University of Canterbury at the Wellington and Christchurch campuses.

The courses available from both Wellington and Christchurch are:
GISC 401: Foundations of Geographic Information Science (GIS)
GISC 402:  Geographic Information Science (GIS) Research
GISC 403: Cartography and Geovisualisation
GISC 404: Geospatial Analysis
GISC 405: GIS Programming and Databases
GISC 406: Remote Sensing for Earth Observation
GISC 410: GIS 2.0
GISC 411: Geographic Information Systems (GIS) in Health
GISC 412: Spatial Algorithms and Programming for GIS
GISC 413: Special Topic - Geomatic Data Acquisition Techniques
GISC 415: GIS Internship
GISC 690(UC) GISC 591 (VUW): Masters in Geographic Information Science (GIS) Thesis
Electives outside the MGIS programme are also possible with the permission of the Programme Director

Further information on the courses are available at www.mgis.ac.nz and I am happy to answer any questions or queries.  We can still accept late entry into the programme and courses.

We’re also in discussions about offering the programme at other New Zealand locations – so watch this space!


Thursday, 1 December 2011

Women in Spatial


At the recent SSSC (Survey and Spatial Science Conference) in Wellington, I attended a Women in Spatial breakfast.  Unfortunately most of the speakers (barring the guest speaker Cecila Wade - the major of Wellington) were men.  Does this mean that all the 'leading' voices for women aren't women?  Are we really so underdeveloped a sector within the Spatial Science arena?

Personally, I doubt this very much - but at the moment, I'm lacking evidence of women who are willing to put themselves forward and reach out to other women to encourage them to pursue Spatial Science careers.  Can it really be so simple as to say girls aren't encouraged to do sciences as suggested by one of the male speakers at the panel discussion at the end of the conference? I don't see this in my undergraduate classes where students are pretty evenly mixed.  However, when you get to postgrad the mix changes dramatically.  Food for thought.

If you're in Wellington or New Zealand and would like to get involved with the New Zealand branch of Women in Spatial - please check out their linkedin page.

Sunday, 20 November 2011

Spatial Expo at the SSSC - 22 November 2011

I'm manning an MGIS stand at the SSSC conference in Wellington this week - please come along if you're interested in finding out more about the MGIS (Masters in GIS).

There's an open day spatial Expo on the 22nd November from 10am - 5pm.

Wednesday, 7 September 2011

Canterbury Software Summit

I'm down in Christchurch for the evening at the Canterbury software summit. Currently learning about Dell's changing marketing and business strategies. Some really interesting talks and have so far spoken to someone about the demand for GIS graduates. Sounds very positive for the MGIS masters students!