This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import simplegeometry | |
parsedG = simplegeometry.parseline("MULTILINESTRING ((1208120.9130000025 745513.05599999428 NULL 20, 1208147.5579999983 746483.423999995 NULL 20.182, 1208156.1369999945 746685.62999999523 NULL 20.22, 1208167.1659999937 746871.90399999917 NULL 20.255, 1208183.0980000049 747065.53200000525 NULL 20.292, 1208224.0849999934 747534.46500000358 NULL 20.38, 1208278.5320000052 748175.35199999809 NULL 20.503, 1208298.1400000006 748436.38099999726 NULL 20.553, 1208316.5219999999 748766.0380000025 NULL 20.616, 1208325.6720000058 748994.7880000025 NULL 20.66, 1208329.1790000051 749297.90999999642 NULL 20.719, 1208322.6490000039 749569.95900000632 NULL 20.772, 1208314.0709999949 749826.0869999975 NULL 20.822, 1208285.8959999979 750428.78900000453 NULL 20.94, 1208283.375 750469.80500000715 NULL 20.95, 1208271.1790000051 750746.43000000715 NULL 20.999, 1208265.050999999 751041.77300000191 NULL 21.05, 1208273.4159999937 751666.8180000037 NULL 21.16, 1208281.0789999962 752090.83499999344 NULL 21.242, 120 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Exports the legend from an ArcGIS Server map service as an HTML document. | |
Parameters: | |
0 ArcGIS Server map service legend URL | |
1 Inline Images (optional) | |
If this parameter is set to any value, the images will be included inline | |
in the CSS instead of being saved to separate image files. (Note that this | |
method is not supported by Internet Explorer 7.) | |
""" | |
import sys, re, base64, httplib, json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Creates copies of the timesheet files for the current pay period. | |
Place this file in the same directory as your timesheet FileMaker Pro files. | |
When you run this script, it will make copies of the files and append the | |
date of the last day of the current pay period. | |
""" | |
import sys, os, shutil, datetime, calendar | |
# Get today's date. | |
today = datetime.date.today() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Remove the ".exclude" extension from all files in this directory. | |
""" | |
import os, re, pysvn | |
# Get all of the files in the directory. | |
excludeFiles = os.listdir('.') | |
# Filter so only those ending with ".exclude" are in the list. | |
regex = re.compile('.+\.exclude$', re.IGNORECASE) | |
excludeFiles = filter(lambda f: regex.search(f), excludeFiles) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Selects the feature classes in a database. Returns names, geometry types, and title. | |
SELECT | |
i.[Name], | |
i.[Definition].value(N'(/DEFeatureClassInfo/ShapeType)[1]', N'varchar(30)') as GeometryType, | |
i.[Documentation].value(N'(/metadata/idinfo/citation/citeinfo/title)[1]', N'varchar(255)') as Title | |
FROM dbo.GDB_ITEMS AS i INNER JOIN | |
dbo.GDB_ITEMTYPES AS t ON i.Type = t.UUID | |
WHERE t.Name = 'Feature Class' | |
ORDER BY i.Name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private List<string> GetMetadataForLayers() | |
{ | |
var mapServer = (IMapServer3)_serverObjectHelper.ServerObject; // _serverObjectHelper is an IServerObjectHelper | |
string defaultMapName = mapServer.DefaultMapName; | |
var msDataAccess = (IMapServerDataAccess)_serverObjectHelper.ServerObject; | |
IMapServerInfo3 mapServerInfo = (IMapServerInfo3)mapServer.GetServerInfo(defaultMapName); | |
IMapLayerInfos layerInfos = mapServerInfo.MapLayerInfos; | |
List<string> xmlList = new List<string>(layerInfos.Count); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace FileSystemHelper | |
{ | |
public static class FileSystemExtensions | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Wsdot.GIS.Geometry.Conversion | |
{ | |
using System; | |
using System.Collections.Generic; | |
using ESRI.ArcGIS.SOAP; | |
using Microsoft.SqlServer.Types; | |
public static class SqlGeoemtryExtensions | |
{ | |
/// <summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using ESRI.ArcGIS.Carto; | |
using ESRI.ArcGIS.esriSystem; | |
using ESRI.ArcGIS.Geodatabase; | |
using ESRI.ArcGIS.Server; | |
namespace Wsdot.ArcObjects.Extensions | |
{ | |
public static class ArcObjectsLinqExtensions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This RegEx should match any valid state route identifier. | |
var _SR_REGEX = /^(\d{3})(?:((?:AR)|(?:C[DI])|(?:C[O])|(?:F[DI])|(?:LX)|(?:[PQRS][\dU])|(?:RL)|(?:SP)|(?:TB)|(?:TR)|(?:PR)|(?:F[ST])|(?:ML))([A-Z0-9]{0,6}))?$/i; | |
/* | |
==RRTs (Related Roadway Type)== | |
AR Alternate Route | |
CD Collector Distributor (Dec) | |
CI Collector Distributor (Inc) | |
CO Couplet | |
FI Frontage Road (Inc) |
OlderNewer