NYGeog

Geography, GIS, Geospatial, NYC, etc.

Friday, December 17, 2010

Replace((Right([ID],3)), "_", "") in ArcGIS Field Calculator

It seems like for the longest time I've used multiple temp fields for parsing values out of non-standard length text or integer unique ID values. For example, in a text field, unique (shown here in a python list format for no reason in particular other than I am learning python) ID's like;

list = [12345_N1, 12345_B25, 6789_N1, 6789_B25, 6789_B50]

Normally, I would create a temp field and say;

Right([list], 3)

create a temp2 field and select the '_N1' values and calculate that separately with;

Right([list], 2)

and then combine the two things together into one field in a haphazardly but workable way.

Granted, the more complex a statement is, the more chances for error, but once the syntax is set and ingrained in your vocabulary its amazing how much work you'll save in the future. So a more elegant solution to the problem stated above with just one field and one calculation is;

Replace((Right([ID],3)), "_", "") *

So what we are doing here is using the Replace function, which is like;
replace([FIELD_name],"",""

So instead of using [FIELD_name] I'm saying remove these stupid underscores from our selection of the 3 characters from the right side of the field and replace them with "" or nothing.

*Replace (see http://resources.arcgis.com/content/kbase?fa=articleShow&d=20119)

According to Neocartography, the Replace function "kicks ass" (see http://neocartography.wordpress.com/2009/12/22/kicking-ass-with-the-replace-function-in-arcmap-field-calculator/).

Monday, December 6, 2010

From Streetsblog: NYC Agencies Take Home EPA’s Top Honors For Smart Growth

From Streetsblog:
NYC DOT Commissioner Janette Sadik-Khan and Planning Commissioner Amanda Burden were down in D.C. yesterday to accept the Environmental Protection Agency’s annual “Overall Excellence in Smart Growth” award. The EPA highlighted four PlaNYC-related initiatives for recognition: NYC DOT’s Street Design Manual, the city’s Active Design Guidelines, City Planning’s Food Retail Expansion to Support Health (FRESH) program, and the zoning amendment that passed in 2009 requiring new apartments and offices to include bike parking.

MORE...

Wednesday, December 1, 2010

ModelBuilder-Advanced Technologies ESRI UC Video


http://video.esri.com/watch/91/modelbuilder-advanced-technologies

Here is a great video from the ESRI User Conference 2010 on Advanced Modelbuilder capabilities. It covers iterations which is awesome for me because its something I'd really like to leverage in my models.