Friday, January 7, 2011

Developer Guidelines for Python

For anyone getting heavily involved with python development or wants to start getting involved with python, I recommend you follow the PEP-8 specs outlined on http://www.python.org/.  It's a simple enough programming style that I find allows for easy cooperation between developers. 

If that isn't good enough for you to follow, it's also the official develop style of the programming language. 

So check it out, and improve your python skills today: http://www.python.org/dev/peps/pep-0008/

Enjoy

Wednesday, January 5, 2011

TIGER Data Download Frenzy

It's here, so go get it.  The TIGER data is ready to go! Get it here.

Enjoy

Friday, December 3, 2010

Getting Installation Information in ArcGIS 10

At v10 there is a very Arcpy way of getting the installation directory for ArcGIS Desktop.  It's very easy and it goes as follows:

Now we want to see what software is installed on the machine:

You'll ge a list of software installed on the machine.

Happy Coding!

Thursday, October 28, 2010

Dynamic Label Tip

When working with data driven pages, you might want to put the adjacent grid cells on the page layout. What happens is the cell is empty? By default, the value "[EMPTY]" will appear, which is not very pleasing. To get around this issue, there is a property called emptystr. If you set the emptystr=" " you will see nothing instead of "[EMPTY]."


Code sample below:

< dyn emptystr=" " property="PageNumber_E" type="page" >

Tuesday, October 26, 2010

Assigning Alias to Custom Toolboxes

I create lots of custom scripts and toolboxes to help out with various tasks, and I noticed the following message the other day when I exported a script from model builder to python:
# Warning: the toolbox toolbox.tbx DOES NOT have an alias.
# Please assign this toolbox an alias to avoid tool name collisions
# And replace arcpy.gp.toolname(...) with arcpy.toolname_ALIAS(...)

Basically, the system is asking for an Alias to provide an additional unique identifier because tools within the same toolbox cannot have the same name, but tools in other toolboxes can have the same name. 

To define an alias, open ArcCatalog and right click on the tbx file.  Select properties, you'll see this:

Enter in an alias and press ok.

That easy!
Enjoy

Friday, October 8, 2010

Alternate Access Mapping for SharePoint

Alternate Access Mapping enables you to access your Sharepoint site via a typical URL like http://mysharepoint.com instead of hitting the server name at http://mysharepointserver. In combination with DNS A host entries you can also define URLs like http://mysite.mysharepoint.com even though your My Site web application is hosted on a different port.


Let's start:

  1. Go to Central Administration 
  2. Click on the Operations Tab
  3. Click on Alternate Access Mappings under Global Configuration
  4. You should now see a list of your web applications, switch over to the one you want to map to the new URL by selecting it from the drop down on the right side.
  5. Click on Edit Public URLs and change the desired zone URL type to your new domain name. You can also change your internal URLs also by clicking Add Internal URLs.
  6. Now you’ll have to switch over to your DNS server.
  7. Within the DNS Management Console and Under Forward Look up Zones:
  8. Add a new Primary Zone with your new domain name.
  9. Add a new Host (A) to the records and point the IP Address to the SharePoint server.
Enjoy