Home arrow GIS Data & Resources arrow Scripts and Code
GIS-Related Scripts and Programming Code

This section provides a venue for sharing GIS-related programming code and custom scripts in a variety of languages. Posts can be viewed by category or as a whole in blog format (below).

Category Links:

GIS Scripts and Code (Weblog format, All Posts):




ArcGIS Server 9.3, FloatingPanels, and Javascript Frameworks PDF Print E-mail

Written by Steve Gourley,


When playing with AGS 9.3, firebug for Firefox , and fiddler for IE I realized that the esri:FloatingPanel control carries along a lot of baggage with it.  Not only are the esri:FloatingPanels strictly asynchronous, every time you hide/show a panel with javascript, in our case 26KB of the contents of your FloatingPanel are sent from the client to server to maintain session state.  Depending how much content you have in your FloatingPanel the overhead could make your application unusable for slower internet users.
User Comments (1)
17, Jul. 2008
Last Updated ( 22, Jul. 2008 )
Read more...
 
C#, Voting Precinct Web Service Example PDF Print E-mail

Written by Bert Granberg,

GIS-based web services allow web programmers to build website that incorporate GIS functionality to make maps, perform queries, and do spatial analysis without having to understand or acquire GIS software, GIS data, & GIS expertise. They are a great way to get more return out of your GIS investment.

The C# code below is a simple illustration of the use of a gis-based web service within a website to find a voting precinct in the SGID for a given location. It utilizes a web reference to a web service called WSUTSGID_FeatureAttributes created by AGRC that allows any SGID data layer to be queried given the following:

  • mapserv user name (free, but you must register as a user at mapserv.utah.gov )
  • SGID layer name (in this case SGID.U024.VotingPrecincts)
  • Field names from which you want results (in this case Precinct_ID & CNTY_NAME_)
  • UTM X & Y coordinates for location of interest


Note: While AGRC works closely with counties to obtain current voting precinct data, these data sets are not complete at the moment. For current voting precinct information, we recommend contacting county clerks directly.

Example Input:

Example Results:

Comment on this Article
07, Jul. 2008
Last Updated ( 07, Jul. 2008 )
Read more...
 
C# Foundations of Programming FREE EBook PDF Print E-mail

Written by Steve Gourley,

Foundations of Programming is a very well written C# free EBook.  Karl Seguin, a Microsoft MVP, authored this great PDF EBook that covers many programming techniques and foundations that are essential to C# programming.

User Comments (3)
07, Jul. 2008
Read more...
 
ASP.NET & Ampersand in AppSetting or ConnectionString PDF Print E-mail

Written by Steve Gourley,

XML rules make is so that the & character is the token for beginning of a reference. With ASP.NET, you have the ability to store application specific settings (AppSettings) and connectionStrings to name a few. Persay you wanted to store a url with a query string in it eg: 

<appSettings>
        <add key="myLink" value="http://mapserv.utah.gov/SGID?map=true&county=salt lake"/>
</appSettings>

Your .NET application would throw and error and say you needed a semi colon. Another example would be storing the connection string to a sql database.

<connectionStrings>
        <add name="ConnectionString" connectionString="Data Source=mySqlDatabase;Initial Catalog=Table;User ID=ADMIN;Password=&password&" providerName="System.Data.SqlClient"/>
</connectionStrings>

 This would not compile.

Comment on this Article
30, Jun. 2008
Read more...
 
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Results 65 - 72 of 130

AGRC Contacts | UGIC Contacts

feed image feed image

Utah GIS Portal © 2009 AGRC

Optimized for