├── data ├── dev.gdb │ ├── gdb │ ├── States.CHILE.4680.4992.sr.lock │ ├── _gdb.CHILE.4680.4992.sr.lock │ ├── _gdb.CHILE.8964.8172.sr.lock │ ├── Counties.CHILE.4680.4992.sr.lock │ ├── ColoradoHighways.CHILE.4680.4992.sr.lock │ ├── ColoradoCitiesAndTowns.CHILE.4680.4992.sr.lock │ ├── timestamps │ ├── a00000004.spx │ ├── a00000009.spx │ ├── a0000000a.spx │ ├── a0000000b.spx │ ├── a0000000f.spx │ ├── a00000010.spx │ ├── a00000011.spx │ ├── a00000001.gdbtable │ ├── a00000001.gdbtablx │ ├── a00000002.gdbtable │ ├── a00000002.gdbtablx │ ├── a00000003.gdbtable │ ├── a00000003.gdbtablx │ ├── a00000004.gdbtable │ ├── a00000004.gdbtablx │ ├── a00000005.gdbtable │ ├── a00000005.gdbtablx │ ├── a00000006.gdbtable │ ├── a00000006.gdbtablx │ ├── a00000007.gdbtable │ ├── a00000007.gdbtablx │ ├── a00000009.gdbtable │ ├── a00000009.gdbtablx │ ├── a0000000a.gdbtable │ ├── a0000000a.gdbtablx │ ├── a0000000b.gdbtable │ ├── a0000000b.gdbtablx │ ├── a0000000f.gdbtable │ ├── a0000000f.gdbtablx │ ├── a00000010.gdbtable │ ├── a00000010.gdbtablx │ ├── a00000011.gdbtable │ ├── a00000011.gdbtablx │ ├── a00000001.gdbindexes │ ├── a00000003.gdbindexes │ ├── a00000004.gdbindexes │ ├── a00000005.gdbindexes │ ├── a00000006.gdbindexes │ ├── a00000007.gdbindexes │ ├── a00000009.gdbindexes │ ├── a0000000a.gdbindexes │ ├── a0000000b.gdbindexes │ ├── a0000000f.gdbindexes │ ├── a00000010.gdbindexes │ ├── a00000011.gdbindexes │ ├── a00000004.FDO_UUID.atx │ ├── a00000005.FDO_UUID.atx │ ├── a00000001.TablesByName.atx │ ├── a00000004.CatItemsByType.atx │ ├── a00000005.CatRelsByType.atx │ ├── a00000005.CatRelsByOriginID.atx │ ├── a00000006.CatRelTypesByName.atx │ ├── a00000007.CatItemTypesByName.atx │ ├── a00000004.CatItemsByPhysicalName.atx │ ├── a00000005.CatRelsByDestinationID.atx │ ├── a00000006.CatRelTypesByForwardLabel.atx │ ├── a00000006.CatRelTypesByBackwardLabel.atx │ ├── a00000006.CatRelTypesByUUID.atx │ ├── a00000007.CatItemTypesByUUID.atx │ ├── a00000006.CatRelTypesByDestItemTypeID.atx │ ├── a00000006.CatRelTypesByOriginItemTypeID.atx │ └── a00000007.CatItemTypesByParentTypeID.atx └── dev.mxd ├── VectorCache ├── ArcStache.suo ├── _install │ ├── RegAsm.exe │ ├── regasm.exe.config │ ├── UnregisterArcStacheSOE.bat │ ├── install.bat │ ├── uninstall.bat │ └── README.txt ├── RegisterArcStacheSOE │ ├── bin │ │ └── Debug │ │ │ ├── RegisterArcStacheSOE.vshost.exe │ │ │ └── RegisterArcStacheSOE.vshost.exe.manifest │ ├── obj │ │ └── x86 │ │ │ └── Debug │ │ │ └── DesignTimeResolveAssemblyReferencesInput.cache │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RegisterArcStacheSOE.csproj │ └── Program.cs ├── ArcStache │ ├── obj │ │ └── Debug │ │ │ └── DesignTimeResolveAssemblyReferencesInput.cache │ ├── ArcStache.csproj.user │ ├── TileFormat.cs │ ├── Notes.txt │ ├── Extensions │ │ └── IListTExtensions.cs │ ├── App.config │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ArcDeveloper │ │ ├── GeoJSONResponse.cs │ │ ├── GeoJSONCoordinate.cs │ │ ├── GeoJSONGeometryCollection.cs │ │ ├── GeoJSONFormatter.cs │ │ ├── GeoJSONFeatureCollection.cs │ │ ├── GeoJSONFeature.cs │ │ └── GeoJSONGeometry.cs │ ├── TileUtil.cs │ ├── WebMercatorUtil.cs │ ├── ArcStache.csproj │ └── ComLogUtil.cs ├── ArcStache.Tests │ ├── obj │ │ └── Debug │ │ │ └── DesignTimeResolveAssemblyReferencesInput.cache │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Util.Tests.cs │ └── ArcStache.Tests.csproj ├── Backup │ ├── IGISEditableLayer.cs │ ├── IGISJSONSerializable.cs │ ├── IGISXMLSerializable.cs │ ├── InMemoryGISFeature.cs │ ├── IGISAttributes.cs │ ├── IGISFeature.cs │ ├── IGISLayer.cs │ ├── InMemoryGISPointLayer.cs │ ├── InMemoryGISMultiPolygonLayer.cs │ ├── GISPointFeature.cs │ ├── GISPolygonFeature.cs │ ├── GISLineStringFeature.cs │ ├── InMemoryGISLineStringFeature.cs │ ├── GeometryCollectionFeature.cs │ ├── InMemoryGISMultiPolygonFeature.cs │ ├── InMemoryGISPolygonFeature.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── InMemoryGISPointFeature.cs │ ├── InMemoryGISLinearRingFeature.cs │ ├── DTS.Common.GIS.csproj │ └── InMemoryGISLayer.cs └── ArcStache.sln ├── VectorCache.Tests ├── bin │ └── Debug │ │ ├── Gallio.dll │ │ ├── Gallio.pdb │ │ ├── MbUnit.dll │ │ ├── MbUnit.pdb │ │ ├── Gallio35.dll │ │ ├── Gallio35.pdb │ │ ├── MbUnit35.dll │ │ ├── MbUnit35.pdb │ │ ├── VectorCache.dll │ │ ├── VectorCache.pdb │ │ ├── VectorCache.Tests.dll │ │ ├── VectorCache.Tests.pdb │ │ ├── Gallio.XmlSerializers.dll │ │ └── MbUnit35.xml ├── obj │ └── Debug │ │ ├── VectorCache.Tests.dll │ │ ├── VectorCache.Tests.pdb │ │ ├── ResolveAssemblyReference.cache │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ └── VectorCache.Tests.csproj.FileListAbsolute.txt ├── Properties │ └── AssemblyInfo.cs ├── Util.Tests.cs └── VectorCache.Tests.csproj └── VectorCache.Flex └── Samples ├── libs ├── as3corelib.swc └── agslib-2.2-2010-12-08.swc ├── .settings └── org.eclipse.core.resources.prefs ├── src ├── assets │ └── images │ │ ├── dtsagile_logo.png │ │ └── dtsAgile-logo-vsm.png ├── com │ ├── esri │ │ ├── components │ │ │ └── PanelToolTip.mxml │ │ ├── ags │ │ │ └── samples │ │ │ │ └── PortlandTiledMapServiceLayer.as │ │ └── utils │ │ │ └── Hashtable.as │ └── dtsagile │ │ └── ags │ │ ├── utils │ │ ├── TileIndex.as │ │ └── ColorUtil.as │ │ ├── DTSMap.as │ │ └── renderers │ │ ├── RandomColorRenderer.as │ │ └── ColorRampRenderer.as └── Portland.mxml ├── html-template ├── playerProductInstall.swf ├── history │ ├── history.css │ └── historyFrame.html └── index.template.html ├── .flexProperties ├── .project └── .actionScriptProperties /data/dev.gdb/gdb: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /data/dev.gdb/States.CHILE.4680.4992.sr.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/dev.gdb/_gdb.CHILE.4680.4992.sr.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/dev.gdb/_gdb.CHILE.8964.8172.sr.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/dev.gdb/Counties.CHILE.4680.4992.sr.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/dev.gdb/ColoradoHighways.CHILE.4680.4992.sr.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/dev.gdb/ColoradoCitiesAndTowns.CHILE.4680.4992.sr.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/dev.mxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.mxd -------------------------------------------------------------------------------- /data/dev.gdb/timestamps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/timestamps -------------------------------------------------------------------------------- /VectorCache/ArcStache.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache/ArcStache.suo -------------------------------------------------------------------------------- /data/dev.gdb/a00000004.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000004.spx -------------------------------------------------------------------------------- /data/dev.gdb/a00000009.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000009.spx -------------------------------------------------------------------------------- /data/dev.gdb/a0000000a.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a0000000a.spx -------------------------------------------------------------------------------- /data/dev.gdb/a0000000b.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a0000000b.spx -------------------------------------------------------------------------------- /data/dev.gdb/a0000000f.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a0000000f.spx -------------------------------------------------------------------------------- /data/dev.gdb/a00000010.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000010.spx -------------------------------------------------------------------------------- /data/dev.gdb/a00000011.spx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000011.spx -------------------------------------------------------------------------------- /VectorCache/_install/RegAsm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache/_install/RegAsm.exe -------------------------------------------------------------------------------- /data/dev.gdb/a00000001.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000001.gdbtable -------------------------------------------------------------------------------- /data/dev.gdb/a00000001.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000001.gdbtablx -------------------------------------------------------------------------------- /data/dev.gdb/a00000002.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000002.gdbtable -------------------------------------------------------------------------------- /data/dev.gdb/a00000002.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000002.gdbtablx -------------------------------------------------------------------------------- /data/dev.gdb/a00000003.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000003.gdbtable -------------------------------------------------------------------------------- /data/dev.gdb/a00000003.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000003.gdbtablx -------------------------------------------------------------------------------- /data/dev.gdb/a00000004.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000004.gdbtable -------------------------------------------------------------------------------- /data/dev.gdb/a00000004.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000004.gdbtablx -------------------------------------------------------------------------------- /data/dev.gdb/a00000005.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000005.gdbtable -------------------------------------------------------------------------------- /data/dev.gdb/a00000005.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000005.gdbtablx -------------------------------------------------------------------------------- /data/dev.gdb/a00000006.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000006.gdbtable -------------------------------------------------------------------------------- /data/dev.gdb/a00000006.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000006.gdbtablx -------------------------------------------------------------------------------- /data/dev.gdb/a00000007.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000007.gdbtable -------------------------------------------------------------------------------- /data/dev.gdb/a00000007.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000007.gdbtablx -------------------------------------------------------------------------------- /data/dev.gdb/a00000009.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000009.gdbtable -------------------------------------------------------------------------------- /data/dev.gdb/a00000009.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000009.gdbtablx -------------------------------------------------------------------------------- /data/dev.gdb/a0000000a.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a0000000a.gdbtable -------------------------------------------------------------------------------- /data/dev.gdb/a0000000a.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a0000000a.gdbtablx -------------------------------------------------------------------------------- /data/dev.gdb/a0000000b.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a0000000b.gdbtable -------------------------------------------------------------------------------- /data/dev.gdb/a0000000b.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a0000000b.gdbtablx -------------------------------------------------------------------------------- /data/dev.gdb/a0000000f.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a0000000f.gdbtable -------------------------------------------------------------------------------- /data/dev.gdb/a0000000f.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a0000000f.gdbtablx -------------------------------------------------------------------------------- /data/dev.gdb/a00000010.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000010.gdbtable -------------------------------------------------------------------------------- /data/dev.gdb/a00000010.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000010.gdbtablx -------------------------------------------------------------------------------- /data/dev.gdb/a00000011.gdbtable: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000011.gdbtable -------------------------------------------------------------------------------- /data/dev.gdb/a00000011.gdbtablx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000011.gdbtablx -------------------------------------------------------------------------------- /data/dev.gdb/a00000001.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000001.gdbindexes -------------------------------------------------------------------------------- /data/dev.gdb/a00000003.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000003.gdbindexes -------------------------------------------------------------------------------- /data/dev.gdb/a00000004.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000004.gdbindexes -------------------------------------------------------------------------------- /data/dev.gdb/a00000005.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000005.gdbindexes -------------------------------------------------------------------------------- /data/dev.gdb/a00000006.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000006.gdbindexes -------------------------------------------------------------------------------- /data/dev.gdb/a00000007.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000007.gdbindexes -------------------------------------------------------------------------------- /data/dev.gdb/a00000009.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000009.gdbindexes -------------------------------------------------------------------------------- /data/dev.gdb/a0000000a.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a0000000a.gdbindexes -------------------------------------------------------------------------------- /data/dev.gdb/a0000000b.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a0000000b.gdbindexes -------------------------------------------------------------------------------- /data/dev.gdb/a0000000f.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a0000000f.gdbindexes -------------------------------------------------------------------------------- /data/dev.gdb/a00000010.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000010.gdbindexes -------------------------------------------------------------------------------- /data/dev.gdb/a00000011.gdbindexes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000011.gdbindexes -------------------------------------------------------------------------------- /data/dev.gdb/a00000004.FDO_UUID.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000004.FDO_UUID.atx -------------------------------------------------------------------------------- /data/dev.gdb/a00000005.FDO_UUID.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000005.FDO_UUID.atx -------------------------------------------------------------------------------- /VectorCache.Tests/bin/Debug/Gallio.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/bin/Debug/Gallio.dll -------------------------------------------------------------------------------- /VectorCache.Tests/bin/Debug/Gallio.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/bin/Debug/Gallio.pdb -------------------------------------------------------------------------------- /VectorCache.Tests/bin/Debug/MbUnit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/bin/Debug/MbUnit.dll -------------------------------------------------------------------------------- /VectorCache.Tests/bin/Debug/MbUnit.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/bin/Debug/MbUnit.pdb -------------------------------------------------------------------------------- /data/dev.gdb/a00000001.TablesByName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000001.TablesByName.atx -------------------------------------------------------------------------------- /VectorCache.Tests/bin/Debug/Gallio35.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/bin/Debug/Gallio35.dll -------------------------------------------------------------------------------- /VectorCache.Tests/bin/Debug/Gallio35.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/bin/Debug/Gallio35.pdb -------------------------------------------------------------------------------- /VectorCache.Tests/bin/Debug/MbUnit35.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/bin/Debug/MbUnit35.dll -------------------------------------------------------------------------------- /VectorCache.Tests/bin/Debug/MbUnit35.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/bin/Debug/MbUnit35.pdb -------------------------------------------------------------------------------- /data/dev.gdb/a00000004.CatItemsByType.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000004.CatItemsByType.atx -------------------------------------------------------------------------------- /data/dev.gdb/a00000005.CatRelsByType.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000005.CatRelsByType.atx -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/libs/as3corelib.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Flex/Samples/libs/as3corelib.swc -------------------------------------------------------------------------------- /VectorCache.Tests/bin/Debug/VectorCache.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/bin/Debug/VectorCache.dll -------------------------------------------------------------------------------- /VectorCache.Tests/bin/Debug/VectorCache.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/bin/Debug/VectorCache.pdb -------------------------------------------------------------------------------- /data/dev.gdb/a00000005.CatRelsByOriginID.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000005.CatRelsByOriginID.atx -------------------------------------------------------------------------------- /data/dev.gdb/a00000006.CatRelTypesByName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000006.CatRelTypesByName.atx -------------------------------------------------------------------------------- /data/dev.gdb/a00000007.CatItemTypesByName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000007.CatItemTypesByName.atx -------------------------------------------------------------------------------- /VectorCache.Tests/bin/Debug/VectorCache.Tests.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/bin/Debug/VectorCache.Tests.dll -------------------------------------------------------------------------------- /VectorCache.Tests/bin/Debug/VectorCache.Tests.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/bin/Debug/VectorCache.Tests.pdb -------------------------------------------------------------------------------- /VectorCache.Tests/obj/Debug/VectorCache.Tests.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/obj/Debug/VectorCache.Tests.dll -------------------------------------------------------------------------------- /VectorCache.Tests/obj/Debug/VectorCache.Tests.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/obj/Debug/VectorCache.Tests.pdb -------------------------------------------------------------------------------- /data/dev.gdb/a00000004.CatItemsByPhysicalName.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000004.CatItemsByPhysicalName.atx -------------------------------------------------------------------------------- /data/dev.gdb/a00000005.CatRelsByDestinationID.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000005.CatRelsByDestinationID.atx -------------------------------------------------------------------------------- /data/dev.gdb/a00000006.CatRelTypesByForwardLabel.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000006.CatRelTypesByForwardLabel.atx -------------------------------------------------------------------------------- /VectorCache.Tests/bin/Debug/Gallio.XmlSerializers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/bin/Debug/Gallio.XmlSerializers.dll -------------------------------------------------------------------------------- /data/dev.gdb/a00000006.CatRelTypesByBackwardLabel.atx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/data/dev.gdb/a00000006.CatRelTypesByBackwardLabel.atx -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Mon Feb 21 09:27:49 MST 2011 2 | eclipse.preferences.version=1 3 | encoding/=utf-8 4 | -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/libs/agslib-2.2-2010-12-08.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Flex/Samples/libs/agslib-2.2-2010-12-08.swc -------------------------------------------------------------------------------- /VectorCache.Tests/obj/Debug/ResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/obj/Debug/ResolveAssemblyReference.cache -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/src/assets/images/dtsagile_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Flex/Samples/src/assets/images/dtsagile_logo.png -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/html-template/playerProductInstall.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Flex/Samples/html-template/playerProductInstall.swf -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/src/assets/images/dtsAgile-logo-vsm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Flex/Samples/src/assets/images/dtsAgile-logo-vsm.png -------------------------------------------------------------------------------- /VectorCache.Tests/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache.Tests/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /VectorCache/RegisterArcStacheSOE/bin/Debug/RegisterArcStacheSOE.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache/RegisterArcStacheSOE/bin/Debug/RegisterArcStacheSOE.vshost.exe -------------------------------------------------------------------------------- /VectorCache/ArcStache/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache/ArcStache/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /VectorCache/ArcStache.Tests/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache/ArcStache.Tests/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /VectorCache/_install/regasm.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /VectorCache/RegisterArcStacheSOE/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtsagile/arcstache/HEAD/VectorCache/RegisterArcStacheSOE/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/.flexProperties: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /VectorCache/ArcStache/ArcStache.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ShowAllFiles 5 | 6 | -------------------------------------------------------------------------------- /VectorCache/ArcStache/TileFormat.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace ArcStache 7 | { 8 | internal enum TileFormat 9 | { 10 | EsriJson, 11 | GeoJson 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /VectorCache/Backup/IGISEditableLayer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DTS.Common.GIS 6 | { 7 | public interface IGISEditableLayer 8 | { 9 | void Add(IGISFeature feature); 10 | void Update(IGISFeature feature); 11 | void Delete(IGISFeature feature); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /VectorCache/Backup/IGISJSONSerializable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.IO; 5 | using Jayrock.Json; 6 | 7 | namespace DTS.Common.GIS 8 | { 9 | public interface IGISJSONSerializable 10 | { 11 | void ToJSON(JsonTextWriter jwriter); 12 | void FromJSON(JsonTextReader jreader); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /VectorCache/Backup/IGISXMLSerializable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Xml; 5 | using System.Xml.Serialization; 6 | using DTS.Common; 7 | 8 | namespace DTS.Common.GIS 9 | { 10 | public interface IGISXMLSerializable 11 | { 12 | void ToXML(XmlWriter writer); 13 | void FromXML(XmlReader reader); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /VectorCache/Backup/InMemoryGISFeature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using GisSharpBlog.NetTopologySuite.Geometries; 5 | 6 | namespace DTS.Common.GIS 7 | { 8 | public abstract class InMemoryGISFeature: GISFeature 9 | { 10 | public InMemoryGISFeature() 11 | : base(new GISSerializableDictionary()) { } 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /VectorCache/Backup/IGISAttributes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DTS.Common.GIS 6 | { 7 | public interface IGISAttributes : IGISXMLSerializable, IGISJSONSerializable 8 | { 9 | object GetValue(string attribute); 10 | void SetValue(string attribute, object value); 11 | IEnumerable GetKeys(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/html-template/history/history.css: -------------------------------------------------------------------------------- 1 | /* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */ 2 | 3 | #ie_historyFrame { width: 0px; height: 0px; display:none } 4 | #firefox_anchorDiv { width: 0px; height: 0px; display:none } 5 | #safari_formDiv { width: 0px; height: 0px; display:none } 6 | #safari_rememberDiv { width: 0px; height: 0px; display:none } 7 | -------------------------------------------------------------------------------- /VectorCache/Backup/IGISFeature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using GisSharpBlog.NetTopologySuite.Geometries; 5 | using DTS.Common; 6 | using System.Xml; 7 | 8 | namespace DTS.Common.GIS 9 | { 10 | public interface IGISFeature : IGISXMLSerializable, IGISJSONSerializable 11 | { 12 | Geometry Shape { get; set;} 13 | IGISAttributes Attributes { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /VectorCache/Backup/IGISLayer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DTS.Common.GIS 6 | { 7 | public interface IGISLayer: IGISXMLSerializable, IGISJSONSerializable 8 | { 9 | string LayerName { get;} 10 | string KeyFieldName { get;} 11 | IGISFeature Current { get;} 12 | bool MoveNext(); 13 | void Search(string queryString); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /VectorCache/Backup/InMemoryGISPointLayer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DTS.Common.GIS 6 | { 7 | public class InMemoryGISPointLayer: InMemoryGISLayer 8 | { 9 | public InMemoryGISPointLayer(string layerName, string keyFieldName) : base(layerName, keyFieldName) { } 10 | 11 | public override InMemoryGISFeature CreateFeature() 12 | { 13 | return new InMemoryGISPointFeature(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /VectorCache/Backup/InMemoryGISMultiPolygonLayer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DTS.Common.GIS 6 | { 7 | public class InMemoryGISMultiPolygonLayer: InMemoryGISLayer 8 | { 9 | public InMemoryGISMultiPolygonLayer(string layerName, string keyFieldName) : base(layerName, keyFieldName) { } 10 | 11 | public override InMemoryGISFeature CreateFeature() 12 | { 13 | return new InMemoryGISMultiPolygonFeature(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /VectorCache/_install/UnregisterArcStacheSOE.bat: -------------------------------------------------------------------------------- 1 | TITLE DTSAgile: Unregister ArcStache SOE with ArcGIS Server 2 | echo off 3 | REM: ------------------------------------------- 4 | REM: Unregisters ArcStache SOE with ArcGIS Server. 5 | REM: NOTE: Not necessary if you are simply redeploying the SOE 6 | REM: ------------------------------------------- 7 | 8 | @echo .. 9 | @echo ************************* 10 | @echo Unregistering ArcStache SOE with ArcGIS Server... 11 | @echo ************************* 12 | @echo .. 13 | RegisterArcStacheSOE.exe /unregister 14 | 15 | pause -------------------------------------------------------------------------------- /VectorCache/RegisterArcStacheSOE/bin/Debug/RegisterArcStacheSOE.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /VectorCache/ArcStache/Notes.txt: -------------------------------------------------------------------------------- 1 | Core Ideas: 2 | - take a layer/Z/R/C request (check tilestache) 3 | - optional &f=esri if we are asking for Esri Geometry 4 | - if .json file exists on disk, if not 5 | - convert Z,R,C into a bounding box 6 | - query layer for... 7 | - points inside the box 8 | - lines that intersect the box 9 | - polys who's centroids insersect the box 10 | - generalize as needed (based on Z) 11 | - cache file in both formats 12 | - stream back requested format 13 | else 14 | - stream back requested format 15 | 16 | 17 | Tasks: 18 | - get natural earth data so we have global coverage (easier for testing) -------------------------------------------------------------------------------- /VectorCache/Backup/GISPointFeature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using GisSharpBlog.NetTopologySuite.Geometries; 5 | using System.Xml.Serialization; 6 | 7 | namespace DTS.Common.GIS 8 | { 9 | public abstract class GISPointFeature: GISFeature 10 | { 11 | public GISPointFeature(IGISAttributes attributes) : base(attributes) { } 12 | 13 | public Point FeatureShape 14 | { 15 | get 16 | { 17 | return Shape as Point; 18 | } 19 | set 20 | { 21 | Shape = value; 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /VectorCache/Backup/GISPolygonFeature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using GisSharpBlog.NetTopologySuite.Geometries; 5 | using System.Xml.Serialization; 6 | 7 | namespace DTS.Common.GIS 8 | { 9 | public abstract class GISPolygonFeature : GISFeature 10 | { 11 | public GISPolygonFeature(IGISAttributes attributes) : base(attributes) { } 12 | 13 | public Polygon FeatureShape 14 | { 15 | get 16 | { 17 | return Shape as Polygon; 18 | } 19 | set 20 | { 21 | Shape = value; 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /VectorCache/Backup/GISLineStringFeature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using GisSharpBlog.NetTopologySuite.Geometries; 5 | using System.Xml.Serialization; 6 | 7 | namespace DTS.Common.GIS 8 | { 9 | public abstract class GISLineStringFeature : GISFeature 10 | { 11 | public GISLineStringFeature(IGISAttributes attributes) : base(attributes) { } 12 | 13 | public LineString FeatureShape 14 | { 15 | get 16 | { 17 | return Shape as LineString; 18 | } 19 | set 20 | { 21 | Shape = value; 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Samples 4 | 5 | 6 | 7 | 8 | 9 | com.adobe.flexbuilder.project.flexbuilder 10 | 11 | 12 | 13 | 14 | 15 | com.adobe.flexbuilder.project.flexnature 16 | com.adobe.flexbuilder.project.actionscriptnature 17 | 18 | 19 | 20 | bin-release 21 | 2 22 | D:/Projects/arcstache docs/deployments/target 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /VectorCache/_install/install.bat: -------------------------------------------------------------------------------- 1 | TITLE DTSAgile: Installing ArcStache 2 | echo off 3 | REM: ------------------------------------------- 4 | REM: Registers COM components, then starts ArcSOM 5 | REM: NOTE: Assumes ArcSOM has been stopped prior to running script! 6 | REM: ------------------------------------------- 7 | 8 | @echo .. 9 | @echo ************************* 10 | @echo Registering COM components with .NET 11 | @echo ************************* 12 | @echo .. 13 | @echo ------------------------- 14 | @echo Registering ArcStache.dll with .NET ... 15 | @echo ------------------------- 16 | @echo .. 17 | regasm ArcStache.dll /tlb:ArcStache.tlb /codebase 18 | 19 | @echo .. 20 | @echo ************************* 21 | @echo Restarting ArcGIS Server Object Manager which starts SOC Manager 22 | @echo ************************* 23 | @echo .. 24 | SC START ArcServerObjectManager 25 | 26 | pause -------------------------------------------------------------------------------- /VectorCache/ArcStache/Extensions/IListTExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace ArcStache.Extensions 7 | { 8 | public static class IListTExtensions 9 | { 10 | public static string ToDelimitedString(this IList input, string delimiter) 11 | { 12 | if (input == null) 13 | { 14 | throw new ArgumentException("input"); 15 | } 16 | 17 | StringBuilder sb = new StringBuilder(); 18 | string value = null; 19 | foreach (T item in input) 20 | { 21 | value = (sb.Length == 0) ? item.ToString() : string.Format("{0}{1}", delimiter, item.ToString()); 22 | sb.Append(value); 23 | } 24 | 25 | return sb.ToString(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/html-template/history/historyFrame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 27 | Hidden frame for Browser History support. 28 | 29 | 30 | -------------------------------------------------------------------------------- /VectorCache/Backup/InMemoryGISLineStringFeature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using GisSharpBlog.NetTopologySuite.Geometries; 5 | 6 | namespace DTS.Common.GIS 7 | { 8 | public class InMemoryGISLineStringFeature : InMemoryGISFeature 9 | { 10 | LineString _shape; 11 | 12 | public InMemoryGISLineStringFeature() { } 13 | 14 | public InMemoryGISLineStringFeature(Coordinate[] points) 15 | { 16 | Shape = new LineString(points); 17 | } 18 | 19 | public override Geometry Shape 20 | { 21 | get 22 | { 23 | return _shape; 24 | } 25 | set 26 | { 27 | if (value == null || value is LineString) 28 | _shape = value as LineString; 29 | else 30 | throw new ArgumentException("Shape should be of type [LineString]"); 31 | } 32 | } 33 | 34 | public LineString FeatureShape 35 | { 36 | get { return Shape as LineString; } 37 | set { Shape = value; } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /VectorCache/Backup/GeometryCollectionFeature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using GisSharpBlog.NetTopologySuite.Geometries; 5 | 6 | namespace DTS.Common.GIS 7 | { 8 | public class GeometryCollectionFeature: GISFeature 9 | { 10 | GeometryCollection _shape; 11 | 12 | public GeometryCollectionFeature(IGISAttributes attributes) : base(attributes) { } 13 | 14 | public override Geometry Shape 15 | { 16 | get 17 | { 18 | return _shape; 19 | } 20 | set 21 | { 22 | if (value == null || value is GeometryCollection) 23 | _shape = value as GeometryCollection; 24 | else 25 | throw new ArgumentException("Shape should be of type [GeometryCollection]"); 26 | } 27 | } 28 | 29 | public GeometryCollection FeatureShape 30 | { 31 | get 32 | { 33 | return Shape as GeometryCollection; 34 | } 35 | set 36 | { 37 | Shape = value; 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/src/com/esri/components/PanelToolTip.mxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /VectorCache/Backup/InMemoryGISMultiPolygonFeature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using GisSharpBlog.NetTopologySuite.Geometries; 5 | 6 | namespace DTS.Common.GIS 7 | { 8 | public class InMemoryGISMultiPolygonFeature: InMemoryGISFeature 9 | { 10 | MultiPolygon _shape; 11 | 12 | public InMemoryGISMultiPolygonFeature() { } 13 | 14 | #region Constructors 15 | 16 | public InMemoryGISMultiPolygonFeature(Polygon[] polygons) 17 | { 18 | Shape = new MultiPolygon(polygons); 19 | } 20 | 21 | #endregion 22 | 23 | public override Geometry Shape 24 | { 25 | get 26 | { 27 | return _shape; 28 | } 29 | set 30 | { 31 | if (value == null || value is MultiPolygon) 32 | _shape = value as MultiPolygon; 33 | else 34 | throw new ArgumentException("Shape should be of type [MultiPolygon]"); 35 | } 36 | } 37 | 38 | public MultiPolygon FeatureShape 39 | { 40 | get { return Shape as MultiPolygon; } 41 | set { Shape = value; } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /VectorCache/_install/uninstall.bat: -------------------------------------------------------------------------------- 1 | TITLE DTSAgile: Uninstalling ArcStache 2 | echo off 3 | REM: ------------------------------------------- 4 | REM: Shuts down ArcSOM, Unregisters COM components, then deletes tlb and dll files 5 | REM: NOTE: Does NOT restart ArcSOM. Assumes you will run install.bat 6 | REM: ------------------------------------------- 7 | 8 | @echo .. 9 | @echo ************************* 10 | @echo Unregistering COM components with .NET 11 | @echo ************************* 12 | @echo .. 13 | 14 | @echo ------------------------- 15 | @echo Unregistering ArcStache.dll with .NET ... 16 | @echo ------------------------- 17 | regasm /unregister ArcStache.dll 18 | 19 | @echo .. 20 | @echo .. 21 | @echo ************************* 22 | @echo Stopping ArcGIS Server Object Manager and SOC Manager 23 | @echo ************************* 24 | @echo .. 25 | SC STOP ArcServerObjectManager 26 | REM: Delay 5 seconds while SOM shuts down before shutting down SOC Monitor 27 | ping -n 5 localhost > NUL 28 | SC STOP ArcSOCMonitor 29 | 30 | 31 | REM: Delay 10 seconds while SOM shuts down before deleting DLLs 32 | ping -n 5 localhost > NUL 33 | 34 | @echo .. 35 | @echo ************************* 36 | @echo Deleting files (tlb, Logs/*.txt)... 37 | @echo ************************* 38 | @echo .. 39 | del *.tlb 40 | del *.pdb 41 | del Logs\*.txt 42 | 43 | pause -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/.actionScriptProperties: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /VectorCache/Backup/InMemoryGISPolygonFeature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using GisSharpBlog.NetTopologySuite.Geometries; 5 | 6 | namespace DTS.Common.GIS 7 | { 8 | public class InMemoryGISPolygonFeature : InMemoryGISFeature 9 | { 10 | Polygon _shape; 11 | 12 | public InMemoryGISPolygonFeature() { } 13 | 14 | #region Constructors 15 | 16 | public InMemoryGISPolygonFeature(LinearRing outerShell) 17 | { 18 | Shape = new Polygon(outerShell); 19 | } 20 | 21 | public InMemoryGISPolygonFeature(LinearRing outerShell, LinearRing[] innerHoles) 22 | { 23 | Shape = new Polygon(outerShell, innerHoles); 24 | } 25 | 26 | #endregion 27 | 28 | public override Geometry Shape 29 | { 30 | get 31 | { 32 | return _shape; 33 | } 34 | set 35 | { 36 | if (value == null || value is Polygon) 37 | _shape = value as Polygon; 38 | else 39 | throw new ArgumentException("Shape should be of type [Polygon]"); 40 | } 41 | } 42 | 43 | public Polygon FeatureShape 44 | { 45 | get { return Shape as Polygon; } 46 | set { Shape = value; } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /VectorCache.Tests/obj/Debug/VectorCache.Tests.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\VectorCache.Tests.dll 2 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\VectorCache.Tests.pdb 3 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\Gallio.dll 4 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\Gallio35.dll 5 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\MbUnit.dll 6 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\MbUnit35.dll 7 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\VectorCache.dll 8 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\VectorCache.pdb 9 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\Gallio.pdb 10 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\Gallio.xml 11 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\MbUnit.pdb 12 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\MbUnit.xml 13 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\Gallio35.pdb 14 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\Gallio35.xml 15 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\MbUnit35.pdb 16 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\MbUnit35.xml 17 | E:\SVN\arcstache\trunk\VectorCache.Tests\bin\Debug\Gallio.XmlSerializers.dll 18 | E:\SVN\arcstache\trunk\VectorCache.Tests\obj\Debug\ResolveAssemblyReference.cache 19 | E:\SVN\arcstache\trunk\VectorCache.Tests\obj\Debug\VectorCache.Tests.dll 20 | E:\SVN\arcstache\trunk\VectorCache.Tests\obj\Debug\VectorCache.Tests.pdb 21 | -------------------------------------------------------------------------------- /VectorCache/ArcStache/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /VectorCache/Backup/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("DTS.Common.GIS")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("DTS")] 12 | [assembly: AssemblyProduct("DTS.Common.GIS")] 13 | [assembly: AssemblyCopyright("Copyright © DTS 2008")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("bfd193f3-141d-4bd5-831b-f8db278338f0")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /VectorCache/Backup/InMemoryGISPointFeature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using GisSharpBlog.NetTopologySuite.Geometries; 5 | 6 | namespace DTS.Common.GIS 7 | { 8 | public class InMemoryGISPointFeature : InMemoryGISFeature 9 | { 10 | Point _shape; 11 | 12 | #region "Constructors" 13 | 14 | public InMemoryGISPointFeature() 15 | { 16 | Shape = new Point(0, 0); 17 | } 18 | 19 | public InMemoryGISPointFeature(double x, double y) 20 | { 21 | Shape = new Point(x, y); 22 | } 23 | 24 | public InMemoryGISPointFeature(double x, double y, double z) 25 | { 26 | Shape = new Point(x, y, z); 27 | } 28 | 29 | public InMemoryGISPointFeature(Coordinate coord) 30 | { 31 | Shape = new Point(coord); 32 | } 33 | 34 | #endregion 35 | 36 | public override Geometry Shape 37 | { 38 | get 39 | { 40 | return _shape; 41 | } 42 | set 43 | { 44 | if (value == null || value is Point) 45 | _shape = value as Point; 46 | else 47 | throw new ArgumentException("Shape should be of type [Point]"); 48 | } 49 | } 50 | 51 | public Point FeatureShape 52 | { 53 | get { return _shape as Point; } 54 | set { Shape = value; } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /VectorCache.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("VectorCache.Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("VectorCache.Tests")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2010")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("ec207bd1-b8d1-4843-8981-4158371cdad6")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /VectorCache/Backup/InMemoryGISLinearRingFeature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using GisSharpBlog.NetTopologySuite.Geometries; 5 | 6 | namespace DTS.Common.GIS 7 | { 8 | public class InMemoryGISLinearRingFeature : InMemoryGISFeature 9 | { 10 | LinearRing _shape; 11 | 12 | public InMemoryGISLinearRingFeature() { } 13 | 14 | public InMemoryGISLinearRingFeature(Coordinate[] points) 15 | { 16 | Shape = new LinearRing(points); 17 | } 18 | 19 | public override Geometry Shape 20 | { 21 | get 22 | { 23 | return _shape; 24 | } 25 | set 26 | { 27 | if (value == null || value is LinearRing) 28 | _shape = value as LinearRing; 29 | else 30 | { 31 | if (value is LineString) 32 | { 33 | LineString line = value as LineString; 34 | if(line.Coordinates.Length == 0 ||line.IsClosed) 35 | _shape = new LinearRing(line.Coordinates); 36 | } 37 | else 38 | throw new ArgumentException("Shape should be of type [LinearRing]"); 39 | } 40 | } 41 | } 42 | 43 | public LinearRing FeatureShape 44 | { 45 | get { return Shape as LinearRing; } 46 | set { Shape = value; } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /VectorCache/ArcStache.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ArcStache.Tests")] 9 | [assembly: AssemblyDescription("Unit tests for ArcStache project")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("DTSAgile")] 12 | [assembly: AssemblyProduct("ArcStache.Tests")] 13 | [assembly: AssemblyCopyright("Copyright © DTSAgile 2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("617465eb-03b3-435b-a82a-59a787555f8f")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /VectorCache/RegisterArcStacheSOE/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RegisterArcStacheSOE")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("RegisterArcStacheSOE")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e7bc87c8-db6c-45d0-adee-eb8b989fea51")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /VectorCache/ArcStache/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ArcStache")] 9 | [assembly: AssemblyDescription("Vector tile caching ArcGIS server object extension")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("DTSAgile")] 12 | [assembly: AssemblyProduct("ArcStache")] 13 | [assembly: AssemblyCopyright("Copyright © DTSAgile 2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("4cdbc500-e126-4b34-992f-7fe9198daaf4")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/src/com/dtsagile/ags/utils/TileIndex.as: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2011 DTSAgile 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | // 21 | ////////////////////////////////////////////////////////////////////////////////////// 22 | package com.dtsagile.ags.utils 23 | { 24 | public class TileIndex extends Object 25 | { 26 | 27 | public function TileIndex(row:Number, col:Number) 28 | { 29 | super(); 30 | this.row = row; 31 | this.col = col; 32 | } 33 | 34 | public var row:Number; 35 | public var col:Number; 36 | } 37 | } -------------------------------------------------------------------------------- /VectorCache/_install/README.txt: -------------------------------------------------------------------------------- 1 | ------------------------------- 2 | Instructions 3 | ------------------------------- 4 | Install and uninstall steps below MUST be done with Administrative privileges. Easiest way is to 5 | "Run As Administrator" a CMD window and change to the c:\program files\dtsagile\txwrap\ directory. 6 | Then enter the appropriate commands below. 7 | 8 | ------------------------------- 9 | Install on ArcGIS Server 10 | ------------------------------- 11 | * Running identity (likely \ArcGISSOC): 12 | - must be member of agsusers group 13 | - must have full write access to this install folder and subfolders 14 | 15 | 1. As Administrator, run install.bat 16 | - registers the custom server object extensions with COM 17 | 18 | 2. As Administrator, run RegisterRiskAssessment.exe 19 | - registers the RiskAssessment SOE with ArcGIS Server 20 | - NOTE: This only needs to be run once. Redeploying the 21 | TxWRAP.AGS.SOE.REST.RiskAssessment.dll on a box DOES NOT require rerunning this. 22 | 23 | 3. As Administrator, run RegisterReports.exe 24 | - registers the RiskReports SOE with ArcGIS Server 25 | - NOTE: This only needs to be run once. Redeploying the 26 | TxWRAP.AGS.SOE.REST.Reports.dll on a box DOES NOT require rerunning this. 27 | 28 | ------------------------------- 29 | Uninstall on ArcGIS Server 30 | ------------------------------- 31 | 1. As Administrator, run UnregisterRiskAssessment.bat 32 | - unregisters the RiskAssessment SOE with ArcGIS Server 33 | - NOTE: Only necessary to run this if you are removing the 34 | SOE from the ArcGIS Server for good. 35 | 36 | 2. As Administrator, run UnregisterReports.bat 37 | - unregisters the RiskReports SOE with ArcGIS Server 38 | - NOTE: Only necessary to run this if you are removing the 39 | SOE from the ArcGIS Server for good. 40 | 41 | 3. As Administrator, run uninstall.bat 42 | - unregisters the custom server object extensions with COM -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/src/Portland.mxml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 27 | 28 | 29 | 30 | 31 | 32 | 43 | -------------------------------------------------------------------------------- /VectorCache/ArcStache/ArcDeveloper/GeoJSONResponse.cs: -------------------------------------------------------------------------------- 1 | //====================================================== 2 | #region ArcDeveloper MIT License 3 | //Copyright (c) 2007 ArcDeveoper.net 4 | //Permission is hereby granted, free of charge, to any person obtaining a copy 5 | //of this software and associated documentation files (the "Software"), to deal 6 | //in the Software without restriction, including without limitation the rights 7 | //to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | //copies of the Software, and to permit persons to whom the Software is 9 | //furnished to do so, subject to the following conditions: 10 | //The above copyright notice and this permission notice shall be included in 11 | //all copies or substantial portions of the Software. 12 | //THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | //LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 18 | //THE SOFTWARE. 19 | #endregion 20 | //====================================================== 21 | // Author: ggoodrich 22 | // Date Created: 2/8/2008 9:46:55 AM 23 | //====================================================== 24 | // Author: ggoodrich 25 | // Date Created: 2/8/2008 9:46:55 AM 26 | // Description: 27 | // 28 | //====================================================== 29 | using System; 30 | using System.Collections.Generic; 31 | using System.Runtime.Serialization; 32 | using System.Text; 33 | //using ArcDeveloper.REST.Core.Interfaces; 34 | 35 | namespace ArcDeveloper.REST.Core.Model 36 | { 37 | /// 38 | /// 39 | /// 40 | [DataContract] 41 | public abstract class GeoJSONResponse //:IResponse 42 | { 43 | 44 | 45 | 46 | private string type; 47 | 48 | 49 | /// 50 | /// Default Constructor 51 | /// 52 | /// 53 | public GeoJSONResponse() 54 | { 55 | 56 | } 57 | 58 | 59 | 60 | [DataMember] 61 | public string Type 62 | { 63 | get{ return type;} 64 | set { type = value;} 65 | } 66 | 67 | } 68 | } -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/src/com/dtsagile/ags/DTSMap.as: -------------------------------------------------------------------------------- 1 | package com.dtsagile.ags 2 | { 3 | import com.esri.ags.Map; 4 | 5 | import flash.events.MouseEvent; 6 | import flash.net.URLRequest; 7 | import flash.net.navigateToURL; 8 | 9 | import mx.controls.Alert; 10 | import mx.controls.Image; 11 | import mx.core.FlexGlobals; 12 | 13 | import spark.components.Label; 14 | import spark.filters.GlowFilter; 15 | 16 | /** 17 | * Custom map containing DTSAgile logo next to ESRI's. 18 | * @author jgermain 19 | * 20 | */ 21 | public final class DTSMap extends Map 22 | { 23 | override public function DTSMap() 24 | { 25 | super(); 26 | } 27 | 28 | override protected function createChildren():void 29 | { 30 | super.createChildren(); 31 | 32 | try 33 | { 34 | var glow:GlowFilter = new GlowFilter(0xFFFFFF,1,4,4,6); 35 | 36 | // ---------------------------------- 37 | // DTSAgile logo 38 | // ---------------------------------- 39 | const dtslogo:Image = new Image(); 40 | dtslogo.source = 'assets/images/dtsagile-logo-vsm.png'; 41 | dtslogo.width = 124; 42 | dtslogo.height = 35; 43 | dtslogo.alpha = 0.9; 44 | dtslogo.useHandCursor = true; 45 | dtslogo.buttonMode = true; 46 | dtslogo.filters = [glow]; 47 | dtslogo.addEventListener(MouseEvent.CLICK, dtslogoClickHandler); 48 | 49 | // Above and centered over ESRI 50 | //dtslogo.setStyle("right", 30); 51 | //dtslogo.setStyle("bottom", 50); 52 | 53 | // Left of and inline with ESRI 54 | dtslogo.setStyle("right", 100); 55 | dtslogo.setStyle("bottom", 6); 56 | 57 | staticLayer.addElement(dtslogo); 58 | 59 | // // ---------------------------------- 60 | // // Copyright 61 | // // ---------------------------------- 62 | // var copyright:Label = new Label(); 63 | // copyright.text = "© 2010 DTSAgile"; 64 | // copyright.styleName = "mapCopyrightLabel"; 65 | // var copyrightGlow:GlowFilter = new GlowFilter(0xFFFFFF, 1, 4, 4, 4); 66 | // copyright.filters = [copyrightGlow]; 67 | // 68 | // copyright.setStyle("right", 200); 69 | // copyright.setStyle("bottom", 5); 70 | // 71 | // staticLayer.addElement(copyright); 72 | 73 | } 74 | catch(error:Error) 75 | { 76 | Alert.show(error.message); 77 | } 78 | } 79 | 80 | private function dtslogoClickHandler(event:MouseEvent):void 81 | { 82 | navigateToURL(new URLRequest('http://dtsagile.com/')); 83 | } 84 | } 85 | 86 | } -------------------------------------------------------------------------------- /VectorCache/ArcStache/ArcDeveloper/GeoJSONCoordinate.cs: -------------------------------------------------------------------------------- 1 | //====================================================== 2 | #region ArcDeveloper MIT License 3 | //Copyright (c) 2007 ArcDeveoper.net 4 | //Permission is hereby granted, free of charge, to any person obtaining a copy 5 | //of this software and associated documentation files (the "Software"), to deal 6 | //in the Software without restriction, including without limitation the rights 7 | //to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | //copies of the Software, and to permit persons to whom the Software is 9 | //furnished to do so, subject to the following conditions: 10 | //The above copyright notice and this permission notice shall be included in 11 | //all copies or substantial portions of the Software. 12 | //THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | //LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 18 | //THE SOFTWARE. 19 | #endregion 20 | //====================================================== 21 | // Author: ggoodrich 22 | // Date Created: 2/8/2008 8:30:53 AM 23 | //====================================================== 24 | // Author: ggoodrich 25 | // Date Created: 2/8/2008 8:30:53 AM 26 | // Description: 27 | // 28 | //====================================================== 29 | using System; 30 | using System.Collections.Generic; 31 | using System.Text; 32 | 33 | namespace ArcDeveloper 34 | { 35 | /// 36 | /// 37 | /// 38 | public class GeoJSONCoordinate 39 | { 40 | 41 | 42 | private double x; 43 | private double y; 44 | 45 | 46 | /// 47 | /// Default Constructor 48 | /// 49 | /// 50 | public GeoJSONCoordinate(double x, double y) 51 | { 52 | this.x = x; 53 | this.y = y; 54 | } 55 | 56 | public double X 57 | { 58 | get { return x; } 59 | set { x = value; } 60 | } 61 | 62 | public double Y 63 | { 64 | get { return y; } 65 | set { y = value; } 66 | } 67 | 68 | 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /VectorCache/ArcStache/ArcDeveloper/GeoJSONGeometryCollection.cs: -------------------------------------------------------------------------------- 1 | //====================================================== 2 | #region ArcDeveloper MIT License 3 | //Copyright (c) 2007 ArcDeveoper.net 4 | //Permission is hereby granted, free of charge, to any person obtaining a copy 5 | //of this software and associated documentation files (the "Software"), to deal 6 | //in the Software without restriction, including without limitation the rights 7 | //to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | //copies of the Software, and to permit persons to whom the Software is 9 | //furnished to do so, subject to the following conditions: 10 | //The above copyright notice and this permission notice shall be included in 11 | //all copies or substantial portions of the Software. 12 | //THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | //LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 18 | //THE SOFTWARE. 19 | #endregion 20 | //====================================================== 21 | // Author: ggoodrich 22 | // Date Created: 2/8/2008 8:28:45 AM 23 | //====================================================== 24 | // Author: ggoodrich 25 | // Date Created: 2/8/2008 8:28:45 AM 26 | // Description: 27 | // 28 | //====================================================== 29 | using System; 30 | using System.Collections.Generic; 31 | using System.Text; 32 | //using ArcDeveloper.REST.Core.Interfaces; 33 | 34 | namespace ArcDeveloper 35 | { 36 | /// 37 | /// 38 | /// 39 | public class GeoJSONGeometryCollection 40 | { 41 | 42 | #region Private members 43 | 44 | private IList geometries; 45 | 46 | 47 | 48 | #endregion 49 | 50 | #region Constructors 51 | /// 52 | /// Default Constructor 53 | /// 54 | /// 55 | public GeoJSONGeometryCollection() 56 | { 57 | 58 | } 59 | 60 | 61 | #endregion 62 | 63 | #region Properties 64 | public IList Geometries 65 | { 66 | get { return geometries; } 67 | set { geometries = value; } 68 | } 69 | #endregion 70 | 71 | #region Public Methods 72 | 73 | #endregion 74 | 75 | #region Private Subs and Methods 76 | 77 | #endregion 78 | 79 | 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /VectorCache.Tests/Util.Tests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Gallio.Framework; 5 | using MbUnit.Framework; 6 | using MbUnit.Framework.ContractVerifiers; 7 | using VectorCache; 8 | using ESRI.ArcGIS.Geometry; 9 | using ESRI.ArcGIS.esriSystem; 10 | 11 | namespace VectorCache.Tests 12 | { 13 | [TestFixture] 14 | public class Util 15 | { 16 | 17 | 18 | [Test] 19 | public void Tile_0_0_0_Returns_Entire_World() 20 | { 21 | ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server); 22 | 23 | IEnvelope e = TileUtil.GetEnvelopeFromZoomRowCol(0, 0, 0); 24 | Assert.AreEqual(e.XMax, 180); 25 | Assert.AreEqual(e.XMin, -180); 26 | Assert.AreApproximatelyEqual(e.YMax, 85.0511, 0.001); 27 | Assert.AreApproximatelyEqual(e.YMin, -85.0511, 0.001); 28 | } 29 | 30 | 31 | [Test] 32 | public void Tile_13_3083_1702() 33 | { 34 | ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server); 35 | 36 | IPoint p1 = TileUtil.TileToGeographic(1702, 3083, 13); 37 | IPoint p2 = TileUtil.TileToGeographic(1703, 3084, 13); 38 | 39 | 40 | IEnvelope e = TileUtil.GetEnvelopeFromZoomRowCol(13, 1702, 3083); 41 | Assert.AreApproximatelyEqual(e.UpperLeft.X, p1.X, 0.001); 42 | Assert.AreApproximatelyEqual(e.LowerRight.X, p2.X, 0.001); 43 | Assert.AreApproximatelyEqual(e.UpperLeft.Y, p1.Y, 0.001); 44 | Assert.AreApproximatelyEqual(e.LowerRight.Y, p2.Y, 0.001); 45 | } 46 | 47 | [Test] 48 | public void TileToWorldPosition() 49 | { 50 | ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server); 51 | IPoint p = TileUtil.TileToWorldPos(1702, 3083,13); 52 | Assert.AreApproximatelyEqual(p.X, -105.20, 0.1); 53 | Assert.AreApproximatelyEqual(p.Y, 40.61, 0.1); 54 | 55 | } 56 | 57 | 58 | [Test] 59 | public void TileToGeographic() 60 | { 61 | ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server); 62 | IPoint p = TileUtil.TileToGeographic(1702, 3083, 13); 63 | Assert.AreApproximatelyEqual(p.X, -105.20, 0.1); 64 | Assert.AreApproximatelyEqual(p.Y, 40.61, 0.1); 65 | 66 | } 67 | 68 | [Test] 69 | public void TileToGeographicPoints() 70 | { 71 | ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server); 72 | IPoint p1 = TileUtil.TileToGeographic(1702, 3083, 13); 73 | IPoint p2 = TileUtil.TileToGeographic(1703, 3084, 13); 74 | Assert.AreApproximatelyEqual(p1.X, -105.20, 0.1); 75 | Assert.AreApproximatelyEqual(p1.Y, 40.61, 0.1); 76 | 77 | } 78 | 79 | 80 | 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /VectorCache/ArcStache.Tests/Util.Tests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using ArcStache; 5 | using ESRI.ArcGIS.esriSystem; 6 | using ESRI.ArcGIS.Geometry; 7 | using Gallio.Framework; 8 | using MbUnit.Framework; 9 | using MbUnit.Framework.ContractVerifiers; 10 | 11 | namespace ArcStache.Tests 12 | { 13 | [TestFixture] 14 | public class Util 15 | { 16 | 17 | 18 | [Test] 19 | public void Tile_0_0_0_Returns_Entire_World() 20 | { 21 | ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server); 22 | 23 | IEnvelope e = TileUtil.GetEnvelopeFromZoomRowCol(0, 0, 0); 24 | Assert.AreEqual(e.XMax, 180); 25 | Assert.AreEqual(e.XMin, -180); 26 | Assert.AreApproximatelyEqual(e.YMax, 85.0511, 0.001); 27 | Assert.AreApproximatelyEqual(e.YMin, -85.0511, 0.001); 28 | } 29 | 30 | 31 | [Test] 32 | public void Tile_13_3083_1702() 33 | { 34 | ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server); 35 | 36 | IPoint p1 = TileUtil.TileToGeographic(1702, 3083, 13); 37 | IPoint p2 = TileUtil.TileToGeographic(1703, 3084, 13); 38 | 39 | 40 | IEnvelope e = TileUtil.GetEnvelopeFromZoomRowCol(13, 1702, 3083); 41 | Assert.AreApproximatelyEqual(e.UpperLeft.X, p1.X, 0.001); 42 | Assert.AreApproximatelyEqual(e.LowerRight.X, p2.X, 0.001); 43 | Assert.AreApproximatelyEqual(e.UpperLeft.Y, p1.Y, 0.001); 44 | Assert.AreApproximatelyEqual(e.LowerRight.Y, p2.Y, 0.001); 45 | } 46 | 47 | [Test] 48 | public void TileToWorldPosition() 49 | { 50 | ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server); 51 | IPoint p = TileUtil.TileToWorldPos(1702, 3083,13); 52 | Assert.AreApproximatelyEqual(p.X, -105.20, 0.1); 53 | Assert.AreApproximatelyEqual(p.Y, 40.61, 0.1); 54 | 55 | } 56 | 57 | 58 | [Test] 59 | public void TileToGeographic() 60 | { 61 | ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server); 62 | IPoint p = TileUtil.TileToGeographic(1702, 3083, 13); 63 | Assert.AreApproximatelyEqual(p.X, -105.20, 0.1); 64 | Assert.AreApproximatelyEqual(p.Y, 40.61, 0.1); 65 | 66 | } 67 | 68 | [Test] 69 | public void TileToGeographicPoints() 70 | { 71 | ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server); 72 | IPoint p1 = TileUtil.TileToGeographic(1702, 3083, 13); 73 | IPoint p2 = TileUtil.TileToGeographic(1703, 3084, 13); 74 | Assert.AreApproximatelyEqual(p1.X, -105.20, 0.1); 75 | Assert.AreApproximatelyEqual(p1.Y, 40.61, 0.1); 76 | 77 | } 78 | 79 | 80 | 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /VectorCache/ArcStache/ArcDeveloper/GeoJSONFormatter.cs: -------------------------------------------------------------------------------- 1 | //====================================================== 2 | #region ArcDeveloper MIT License 3 | //Copyright (c) 2007 ArcDeveoper.net 4 | //Permission is hereby granted, free of charge, to any person obtaining a copy 5 | //of this software and associated documentation files (the "Software"), to deal 6 | //in the Software without restriction, including without limitation the rights 7 | //to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | //copies of the Software, and to permit persons to whom the Software is 9 | //furnished to do so, subject to the following conditions: 10 | //The above copyright notice and this permission notice shall be included in 11 | //all copies or substantial portions of the Software. 12 | //THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | //LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 18 | //THE SOFTWARE. 19 | #endregion 20 | //====================================================== 21 | // Author: ggoodrich 22 | // Date Created: 2/8/2008 8:24:56 AM 23 | //====================================================== 24 | // Author: ggoodrich 25 | // Date Created: 2/8/2008 8:24:56 AM 26 | // Description: 27 | // 28 | //====================================================== 29 | using System; 30 | using System.Collections.Generic; 31 | using System.Text; 32 | using ESRI.ArcGIS.Geodatabase; 33 | 34 | 35 | namespace ArcDeveloper 36 | { 37 | /// 38 | /// 39 | /// 40 | public class GeoJSONFormatter 41 | { 42 | 43 | 44 | 45 | private string name; 46 | 47 | 48 | 49 | /// 50 | /// Default Constructor 51 | /// 52 | /// 53 | public GeoJSONFormatter() 54 | { 55 | 56 | } 57 | 58 | 59 | 60 | public string Name 61 | { 62 | get { return name; } 63 | set { name = value; } 64 | } 65 | 66 | public string GetAsGeoJSON(IRecordSet recordset) 67 | { 68 | GeoJSONFeatureCollection jsonFeatures = new GeoJSONFeatureCollection(); 69 | ICursor cur = recordset.get_Cursor(false); 70 | 71 | IFeature f = (IFeature)cur.NextRow(); 72 | if (f != null) 73 | { 74 | while (f != null) 75 | { 76 | jsonFeatures.Features.Add(GeoJSONFeature.CreateFromIFeature(f)); 77 | f = (IFeature)cur.NextRow(); 78 | 79 | } 80 | } 81 | 82 | return "{}"; 83 | } 84 | 85 | } 86 | } -------------------------------------------------------------------------------- /VectorCache.Tests/bin/Debug/MbUnit35.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MbUnit35 5 | 6 | 7 | 8 | 9 | Provides extended assertions for .Net 3.5. 10 | 11 | 12 | 13 | 14 | Verifies that a particular condition holds true. 15 | 16 | 17 | 18 | If the condition evaluates to false, the assertion failure message will 19 | describe in detail the intermediate value of relevant sub-expressions within 20 | the condition. Consequently the assertion failure will include more diagnostic 21 | information than if were used instead. 22 | 23 | 24 | The conditional expression to evaluate. 25 | Thrown if is null. 26 | Thrown if the verification failed unless the current indicates otherwise. 27 | 28 | 29 | 30 | Verifies that a particular condition holds true. 31 | 32 | 33 | 34 | If the condition evaluates to false, the assertion failure message will 35 | describe in detail the intermediate value of relevant sub-expressions within 36 | the condition. Consequently the assertion failure will include more diagnostic 37 | information than if were used instead. 38 | 39 | 40 | The conditional expression to evaluate. 41 | The custom assertion message format, or null if none. 42 | The custom assertion message arguments, or null if none. 43 | Thrown if is null. 44 | Thrown if the verification failed unless the current indicates otherwise. 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /VectorCache/RegisterArcStacheSOE/RegisterArcStacheSOE.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | x86 6 | 8.0.30703 7 | 2.0 8 | {4686E6B0-D813-4769-BCCD-F351E62C39BE} 9 | Exe 10 | Properties 11 | RegisterArcStacheSOE 12 | RegisterArcStacheSOE 13 | v3.5 14 | 15 | 16 | 512 17 | 18 | 19 | x86 20 | true 21 | full 22 | false 23 | bin\Debug\ 24 | DEBUG;TRACE 25 | prompt 26 | 4 27 | 28 | 29 | x86 30 | pdbonly 31 | true 32 | bin\Release\ 33 | TRACE 34 | prompt 35 | 4 36 | 37 | 38 | 39 | 40 | 41 | True 42 | 43 | 44 | True 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 65 | -------------------------------------------------------------------------------- /VectorCache/ArcStache/TileUtil.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using ESRI.ArcGIS.Geometry; 6 | 7 | namespace ArcStache 8 | { 9 | public static class TileUtil 10 | { 11 | /// 12 | /// Returns NW corner of the tile 13 | /// 14 | /// 15 | /// 16 | /// 17 | /// 18 | public static IPoint TileToWorldPos(long tile_x, long tile_y, long zoom) 19 | { 20 | IPoint p = new PointClass(); 21 | double n = Math.PI - ((2.0 * Math.PI * tile_y) / Math.Pow(2.0, zoom)); 22 | 23 | p.X = (float)((tile_x / Math.Pow(2.0, zoom) * 360.0) - 180.0); 24 | p.Y = (float)(180.0 / Math.PI * Math.Atan(Math.Sinh(n))); 25 | 26 | return p; 27 | } 28 | 29 | 30 | public static IEnvelope GetEnvelopeFromZoomRowCol(int zoom, int row, int col) 31 | { 32 | IEnvelope e = new EnvelopeClass(); 33 | e.SpatialReference = GetSpatialReference(102100); 34 | IPoint llupperLeftPoint = TileToGeographic(col, row, zoom); 35 | IPoint lllowerRightPoint = TileToGeographic(col + 1, row + 1, zoom); 36 | 37 | var upperLeftPtWm = WebMercatorUtil.GeographicToWebMercator(llupperLeftPoint.Y, llupperLeftPoint.X); 38 | IPoint wmUpperLeftPoint = new PointClass(); 39 | wmUpperLeftPoint.X = upperLeftPtWm.X; 40 | wmUpperLeftPoint.Y = upperLeftPtWm.Y; 41 | 42 | var lowerRightPtWm = WebMercatorUtil.GeographicToWebMercator(lllowerRightPoint.Y, lllowerRightPoint.X); 43 | IPoint wmLowerRightPoint = new PointClass(); 44 | wmLowerRightPoint.X = lowerRightPtWm.X; 45 | wmLowerRightPoint.Y = lowerRightPtWm.Y; 46 | 47 | e.UpperLeft = wmUpperLeftPoint; 48 | e.LowerRight = wmLowerRightPoint; 49 | return e; 50 | } 51 | 52 | public static IPoint TileToGeographic(int tileX, int tileY, int zoom) 53 | { 54 | // From http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#C.23 55 | 56 | IPoint point = new PointClass(); 57 | double n = Math.PI - ((2.0 * Math.PI * tileY) / Math.Pow(2.0, zoom)); 58 | point.X = (float)((tileX / Math.Pow(2.0, zoom) * 360.0) - 180.0); 59 | point.Y = (float)(180.0 / Math.PI * Math.Atan(Math.Sinh(n))); 60 | return point; 61 | } 62 | 63 | public static IPoint GeographicToTile(double lon, double lat, int zoom) 64 | { 65 | // From http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#C.23 66 | 67 | IPoint point = new PointClass(); 68 | point.X = (float)((lon + 180.0) / 360.0 * (1 << zoom)); 69 | point.Y = (float)((1.0 - Math.Log(Math.Tan(lat * Math.PI / 180.0) + 1.0 / Math.Cos(lat * Math.PI / 180.0)) / Math.PI) / 2.0 * (1 << zoom)); 70 | 71 | return point; 72 | } 73 | 74 | public static ISpatialReference GetSpatialReference(int wkid) 75 | { 76 | IGeometryServer2 geometryServer = new ESRI.ArcGIS.Geodatabase.GeometryServerClass(); 77 | return geometryServer.FindSRByWKID(string.Empty, wkid, -1, true, true); 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /VectorCache/ArcStache/ArcDeveloper/GeoJSONFeatureCollection.cs: -------------------------------------------------------------------------------- 1 | //====================================================== 2 | #region ArcDeveloper MIT License 3 | //Copyright (c) 2007 ArcDeveoper.net 4 | //Permission is hereby granted, free of charge, to any person obtaining a copy 5 | //of this software and associated documentation files (the "Software"), to deal 6 | //in the Software without restriction, including without limitation the rights 7 | //to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | //copies of the Software, and to permit persons to whom the Software is 9 | //furnished to do so, subject to the following conditions: 10 | //The above copyright notice and this permission notice shall be included in 11 | //all copies or substantial portions of the Software. 12 | //THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | //LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 18 | //THE SOFTWARE. 19 | #endregion 20 | //====================================================== 21 | // Author: ggoodrich 22 | // Date Created: 2/8/2008 8:27:22 AM 23 | //====================================================== 24 | // Author: ggoodrich 25 | // Date Created: 2/8/2008 8:27:22 AM 26 | // Description: 27 | // 28 | //====================================================== 29 | using System; 30 | using System.Collections.Generic; 31 | using System.Text; 32 | //using ArcDeveloper.REST.Core.Interfaces; 33 | using ESRI.ArcGIS.Geodatabase; 34 | 35 | namespace ArcDeveloper 36 | { 37 | /// 38 | /// Represents a GeoJSON featurecollection 39 | /// 40 | public class GeoJSONFeatureCollection 41 | { 42 | 43 | 44 | private List features; 45 | public string Type { get; set; } 46 | 47 | /// 48 | /// Default Constructor 49 | /// 50 | /// 51 | public GeoJSONFeatureCollection() 52 | { 53 | Type = "FeatureCollection"; 54 | } 55 | 56 | 57 | public List Features 58 | { 59 | get 60 | { 61 | if (features==null) 62 | features = new List(); 63 | return features; 64 | } 65 | set { features = value; } 66 | } 67 | 68 | 69 | /// 70 | /// Creates the GeoJSON feature collection from list of . 71 | /// 72 | /// The features. 73 | /// A GeoJSON feature collection 74 | public static GeoJSONFeatureCollection CreateFeatureCollectionFromList(List features) 75 | { 76 | GeoJSONFeatureCollection featCollection = new GeoJSONFeatureCollection(); 77 | foreach(IFeature feat in features) 78 | { 79 | featCollection.Features.Add(GeoJSONFeature.CreateFromIFeature(feat)); 80 | } 81 | return featCollection; 82 | } 83 | 84 | 85 | 86 | } 87 | } -------------------------------------------------------------------------------- /VectorCache/ArcStache/WebMercatorUtil.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace ArcStache 7 | { 8 | 9 | /// 10 | /// Utility class for storing XY coordinate pairs as double. 11 | /// 12 | public class Point 13 | { 14 | /// 15 | /// Gets or sets the X or Longitude coordinate value. 16 | /// 17 | /// The X or Longitude coordinate value. 18 | public double X { get; set; } 19 | /// 20 | /// Gets or sets the Y or Latitude coordinate value. 21 | /// 22 | /// The Y or Latitude coordinate value. 23 | public double Y { get; set; } 24 | } 25 | 26 | 27 | /// 28 | /// Utility class for projecting coordinates from geographic (4326) to web mercator (102100) and back. 29 | /// 30 | public static class WebMercatorUtil 31 | { 32 | static double DEGREES_PER_RADIANS = 180 / Math.PI; 33 | static double RADIANS_PER_DEGREES = Math.PI / 180; 34 | static int RADIUS = 6378137; 35 | static double PI_OVER_2 = Math.PI / 2; 36 | 37 | public static int GEOGRAPHIC_WKID = 4326; 38 | public static int WEBMERCATOR_WKID = 102100; 39 | 40 | /// 41 | /// Converts a coordinate pair in geographic projection (WKID 4326) to web mercator auxillary sphere (102100). 42 | /// 43 | /// The latitude coordinate. 44 | /// The longitude coordinate. 45 | /// 46 | public static Point GeographicToWebMercator(double latitude, double longitude) 47 | { 48 | var x = LongitudeToX(longitude); 49 | var y = LatitudeToY(latitude); 50 | return new Point() { X = x, Y = y }; 51 | } 52 | 53 | /// 54 | /// Converts a coordinate pair in web mercator auxillary sphere projection (WKID 102100) to geographic (4326). 55 | /// 56 | /// The x coordinate. 57 | /// The y coordinate. 58 | /// 59 | public static Point WebMercatorToGeographic(double x, double y) 60 | { 61 | var longitude = XToLongitude(x); 62 | var latitude = YToLatitude(y); 63 | return new Point() { X = longitude, Y = latitude }; 64 | } 65 | 66 | 67 | 68 | public static double LatitudeToY(double latitude) 69 | { 70 | var loc1 = latitude * RADIANS_PER_DEGREES; 71 | var loc2 = Math.Sin(loc1); 72 | return RADIUS * 0.5 * Math.Log((1 + loc2) / (1 - loc2)); 73 | } 74 | 75 | public static double LongitudeToX(double longitude) 76 | { 77 | return longitude * RADIANS_PER_DEGREES * RADIUS; 78 | } 79 | 80 | public static double XToLongitude(double x) 81 | { 82 | var loc1 = x / RADIUS; 83 | var loc2 = loc1 * DEGREES_PER_RADIANS; 84 | var loc3 = Math.Floor((loc2 + 180) / 360); 85 | return loc2 - loc3 * 360; 86 | } 87 | 88 | public static double YToLatitude(double y) 89 | { 90 | var loc1 = PI_OVER_2 - 2 * Math.Atan(Math.Exp(-1 * y / RADIUS)); 91 | return loc1 * DEGREES_PER_RADIANS; 92 | } 93 | 94 | 95 | } 96 | } -------------------------------------------------------------------------------- /VectorCache/ArcStache.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegisterArcStacheSOE", "RegisterArcStacheSOE\RegisterArcStacheSOE.csproj", "{4686E6B0-D813-4769-BCCD-F351E62C39BE}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArcStache", "ArcStache\ArcStache.csproj", "{B3571916-DFBC-4652-9C1B-058AE3C24E39}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArcStache.Tests", "ArcStache.Tests\ArcStache.Tests.csproj", "{5157ED9F-8B35-4822-8B0F-3D48AE023434}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Debug|Mixed Platforms = Debug|Mixed Platforms 14 | Debug|x86 = Debug|x86 15 | Release|Any CPU = Release|Any CPU 16 | Release|Mixed Platforms = Release|Mixed Platforms 17 | Release|x86 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {4686E6B0-D813-4769-BCCD-F351E62C39BE}.Debug|Any CPU.ActiveCfg = Debug|x86 21 | {4686E6B0-D813-4769-BCCD-F351E62C39BE}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 22 | {4686E6B0-D813-4769-BCCD-F351E62C39BE}.Debug|Mixed Platforms.Build.0 = Debug|x86 23 | {4686E6B0-D813-4769-BCCD-F351E62C39BE}.Debug|x86.ActiveCfg = Debug|x86 24 | {4686E6B0-D813-4769-BCCD-F351E62C39BE}.Debug|x86.Build.0 = Debug|x86 25 | {4686E6B0-D813-4769-BCCD-F351E62C39BE}.Release|Any CPU.ActiveCfg = Release|x86 26 | {4686E6B0-D813-4769-BCCD-F351E62C39BE}.Release|Mixed Platforms.ActiveCfg = Release|x86 27 | {4686E6B0-D813-4769-BCCD-F351E62C39BE}.Release|Mixed Platforms.Build.0 = Release|x86 28 | {4686E6B0-D813-4769-BCCD-F351E62C39BE}.Release|x86.ActiveCfg = Release|x86 29 | {4686E6B0-D813-4769-BCCD-F351E62C39BE}.Release|x86.Build.0 = Release|x86 30 | {B3571916-DFBC-4652-9C1B-058AE3C24E39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 31 | {B3571916-DFBC-4652-9C1B-058AE3C24E39}.Debug|Any CPU.Build.0 = Debug|Any CPU 32 | {B3571916-DFBC-4652-9C1B-058AE3C24E39}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 33 | {B3571916-DFBC-4652-9C1B-058AE3C24E39}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 34 | {B3571916-DFBC-4652-9C1B-058AE3C24E39}.Debug|x86.ActiveCfg = Debug|Any CPU 35 | {B3571916-DFBC-4652-9C1B-058AE3C24E39}.Release|Any CPU.ActiveCfg = Release|Any CPU 36 | {B3571916-DFBC-4652-9C1B-058AE3C24E39}.Release|Any CPU.Build.0 = Release|Any CPU 37 | {B3571916-DFBC-4652-9C1B-058AE3C24E39}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 38 | {B3571916-DFBC-4652-9C1B-058AE3C24E39}.Release|Mixed Platforms.Build.0 = Release|Any CPU 39 | {B3571916-DFBC-4652-9C1B-058AE3C24E39}.Release|x86.ActiveCfg = Release|Any CPU 40 | {5157ED9F-8B35-4822-8B0F-3D48AE023434}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 41 | {5157ED9F-8B35-4822-8B0F-3D48AE023434}.Debug|Any CPU.Build.0 = Debug|Any CPU 42 | {5157ED9F-8B35-4822-8B0F-3D48AE023434}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 43 | {5157ED9F-8B35-4822-8B0F-3D48AE023434}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 44 | {5157ED9F-8B35-4822-8B0F-3D48AE023434}.Debug|x86.ActiveCfg = Debug|Any CPU 45 | {5157ED9F-8B35-4822-8B0F-3D48AE023434}.Release|Any CPU.ActiveCfg = Release|Any CPU 46 | {5157ED9F-8B35-4822-8B0F-3D48AE023434}.Release|Any CPU.Build.0 = Release|Any CPU 47 | {5157ED9F-8B35-4822-8B0F-3D48AE023434}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 48 | {5157ED9F-8B35-4822-8B0F-3D48AE023434}.Release|Mixed Platforms.Build.0 = Release|Any CPU 49 | {5157ED9F-8B35-4822-8B0F-3D48AE023434}.Release|x86.ActiveCfg = Release|Any CPU 50 | EndGlobalSection 51 | GlobalSection(SolutionProperties) = preSolution 52 | HideSolutionNode = FALSE 53 | EndGlobalSection 54 | EndGlobal 55 | -------------------------------------------------------------------------------- /data/dev.gdb/a00000006.CatRelTypesByUUID.atx: -------------------------------------------------------------------------------- 1 |  2 |  {0D10B3A7-2F64-45E6-B7AC-2FC27BF2133C}{17E08ADB-2B31-4DCD-8FDD-DF529E88F843}{55D2F4DC-CB17-4E32-A8C7-47591E8C71DE}{583A5BAA-3551-41AE-8AA8-1185719F3889}{5DD0C1AF-CB3D-4FEA-8C51-CB3BA8D77CDB}{5F9085E0-788F-4354-AE3C-34C83A7EA784}{725BADAB-3452-491B-A795-55F32D67229C}{8DB31AF1-DF7C-4632-AA10-3CC44B0C6914}{908A4670-1111-48C6-8269-134FDD3FE617}{A1633A59-46BA-4448-8706-D8ABE2B2B02E}{B32B8563-0B96-4D32-92C4-086423AE9962}{D022DE33-45BD-424C-88BF-5B1B6B957BD3}{D088B110-190B-4229-BDF7-89FDDD14D1EA}{DC739A70-9B71-41E8-868C-008CF46F16D7}{DC78F1AB-34E4-43AC-BA47-1C4EABD0E7C7}{E79B44E3-F833-4B12-90A1-364EC4DDC43E}& -------------------------------------------------------------------------------- /data/dev.gdb/a00000007.CatItemTypesByUUID.atx: -------------------------------------------------------------------------------- 1 |     2 |  {28DA9E89-FF80-4D6D-8926-4EE2B161677D}{35B601F7-45CE-4AFF-ADB7-7702D3839B12}{4ED4A58E-621F-4043-95ED-850FBA45FCBC}{5ED667A3-9CA9-44A2-8029-D95BF23704B9}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{73718A66-AFB9-4B88-A551-CFFA0AE12620}{74737149-DCB5-4257-8904-B9724E32A530}{76357537-3364-48AF-A4BE-783C7C28B5CB}{767152D3-ED66-4325-8774-420D46674E07}{77292603-930F-475D-AE4F-B8970F42F394}{7771FC7D-A38B-4FD3-8225-639D17E9A131}{787BEA35-4A86-494F-BB48-500B96145B58}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{8C368B12-A12E-4C7E-9638-C9C64E69E98F}{A300008D-0CEA-4F6A-9DFA-46AF829A3DF2}{A3803369-5FC2-4963-BAE0-13EFFC09DD73}{B606A7E1-FA5B-439C-849C-6E9C2481537B}{C29DA988-8C3E-45F7-8B5C-18E51EE7BEB4}{C673FE0F-7280-404F-8532-20755DD8FC06}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D5A40288-029E-4766-8C81-DE3F61129371}{D98421EB-D582-4713-9484-43304D0810F6}{DB1B697A-3BB6-426A-98A2-6EE7A4C6AED3}{DC64B6E4-DC0F-43BD-B4F5-F22385DCF055}{DC9EF677-1AA3-45A7-8ACD-303A5202D0DC}{E6302665-416B-44FA-BE33-4E15916BA101}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}{F8413DCB-2248-4935-BFE9-315F397E5110}{FBDD7DD6-4A25-40B7-9A1A-ECC3D1172447}{FFD09C28-FE70-4E25-907C-AF8E8A5EC5F3}&  -------------------------------------------------------------------------------- /data/dev.gdb/a00000006.CatRelTypesByDestItemTypeID.atx: -------------------------------------------------------------------------------- 1 |    2 | {28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{A300008D-0CEA-4F6A-9DFA-46AF829A3DF2}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{CD06BC3B-789D-4C51-AAFA-A467912B8965}{D98421EB-D582-4713-9484-43304D0810F6}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}& -------------------------------------------------------------------------------- /data/dev.gdb/a00000006.CatRelTypesByOriginItemTypeID.atx: -------------------------------------------------------------------------------- 1 |     2 |  {28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{4ED4A58E-621F-4043-95ED-850FBA45FCBC}{70737809-852C-4A03-9E22-2CECEA5B9BFA}{73718A66-AFB9-4B88-A551-CFFA0AE12620}{74737149-DCB5-4257-8904-B9724E32A530}{76357537-3364-48AF-A4BE-783C7C28B5CB}{767152D3-ED66-4325-8774-420D46674E07}{7771FC7D-A38B-4FD3-8225-639D17E9A131}{7771FC7D-A38B-4FD3-8225-639D17E9A131}{A3803369-5FC2-4963-BAE0-13EFFC09DD73}{A3803369-5FC2-4963-BAE0-13EFFC09DD73}{D98421EB-D582-4713-9484-43304D0810F6}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}{F3783E6F-65CA-4514-8315-CE3985DAD3B1}& -------------------------------------------------------------------------------- /data/dev.gdb/a00000007.CatItemTypesByParentTypeID.atx: -------------------------------------------------------------------------------- 1 |  2 |     {00000000-0000-0000-0000-000000000000}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{28DA9E89-FF80-4D6D-8926-4EE2B161677D}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{77292603-930F-475D-AE4F-B8970F42F394}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8405ADD5-8DF8-4227-8FAC-3FCADE073386}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{8637F1ED-8C04-4866-A44A-1CB8288B3C63}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D4912162-3413-476E-9DA4-2AEFBBC16939}{D4912162-3413-476E-9DA4-2AEFBBC16939}{FFD09C28-FE70-4E25-907C-AF8E8A5EC5F3}&  -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/src/com/dtsagile/ags/renderers/RandomColorRenderer.as: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2011 DTSAgile 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | // 21 | ////////////////////////////////////////////////////////////////////////////////////// 22 | package com.dtsagile.ags.renderers 23 | { 24 | import com.dtsagile.ags.utils.ColorUtil; 25 | import com.esri.ags.Graphic; 26 | import com.esri.ags.geometry.Geometry; 27 | import com.esri.ags.renderers.SimpleRenderer; 28 | import com.esri.ags.renderers.UniqueValueRenderer; 29 | import com.esri.ags.renderers.supportClasses.UniqueValueInfo; 30 | import com.esri.ags.symbols.SimpleFillSymbol; 31 | import com.esri.ags.symbols.SimpleLineSymbol; 32 | import com.esri.ags.symbols.SimpleMarkerSymbol; 33 | import com.esri.ags.symbols.Symbol; 34 | import com.esri.utils.Hashtable; 35 | 36 | import mx.utils.UIDUtil; 37 | 38 | public class RandomColorRenderer extends SimpleRenderer 39 | { 40 | private var _symbols:Hashtable = new Hashtable(); 41 | 42 | public var attribute:String; 43 | 44 | public function RandomColorRenderer(attribute:String=null, defaultSymbol:Symbol=null) 45 | { 46 | super(symbol); 47 | this.attribute = attribute; 48 | } 49 | 50 | public override function getSymbol(graphic:Graphic):Symbol 51 | { 52 | // Keeping it simple... 53 | // If attribute supplied, then we roll a "unique value renderer", 54 | // Otherwise, each graphic gets a random color 55 | 56 | var symbol:Symbol = null; 57 | 58 | // Cache our symbols so when layer props are invalidated, we don't apply new colors! 59 | var symbolKey:String = null; 60 | if(this.attribute && graphic.attributes.hasOwnProperty(this.attribute)) 61 | { 62 | // Unique value renderer 63 | symbolKey = graphic.attributes[this.attribute]; 64 | } 65 | else 66 | { 67 | // Simple renderer 68 | symbolKey = UIDUtil.getUID(graphic); 69 | } 70 | 71 | 72 | if(_symbols.find(symbolKey)) 73 | { 74 | symbol = _symbols.find(symbolKey); 75 | } 76 | else 77 | { 78 | symbol = this.getSymbolByGeometryType(graphic.geometry.type); 79 | _symbols.add(symbolKey, symbol); 80 | } 81 | 82 | return symbol; 83 | } 84 | 85 | private function getSymbolByGeometryType(geometryType:String):Symbol 86 | { 87 | var symbol:Symbol = null; 88 | var randomColor:uint = ColorUtil.getRandomColor(); 89 | 90 | switch(geometryType) 91 | { 92 | case Geometry.MAPPOINT: 93 | case Geometry.MULTIPOINT: 94 | symbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 15, randomColor, 1, 0, 0, 0, 95 | new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, 0x000000, 0.8, 2)); 96 | break; 97 | case Geometry.POLYGON: 98 | symbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, randomColor, 0.5, 99 | new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, 0xFFFFFF, 0.8, 2)); 100 | break; 101 | case Geometry.POLYLINE: 102 | symbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, randomColor, 0.8, 2); 103 | break; 104 | default: 105 | throw new Error('Geometry type ' + geometryType + ' is not supported.'); 106 | } 107 | 108 | return symbol; 109 | } 110 | } 111 | } -------------------------------------------------------------------------------- /VectorCache/Backup/DTS.Common.GIS.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | Debug 4 | AnyCPU 5 | 8.0.50727 6 | 2.0 7 | {38C91C3A-E2E6-4FC7-B461-4659A4F92240} 8 | Library 9 | Properties 10 | DTS.Common.GIS 11 | DTS.Common.GIS 12 | true 13 | DTS.snk 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | bin\Debug\DTS.Common.GIS.XML 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | False 36 | ..\DTS.Common\lib\Jayrock.dll 37 | 38 | 39 | False 40 | ..\DTS.Common\lib\Jayrock.Json.dll 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | {6DC55313-5C83-45FB-A389-1DFE93A9D9C6} 79 | DTS.Common 80 | 81 | 82 | 83 | 84 | 85 | 86 | 93 | -------------------------------------------------------------------------------- /VectorCache/ArcStache/ArcDeveloper/GeoJSONFeature.cs: -------------------------------------------------------------------------------- 1 | //====================================================== 2 | 3 | #region ArcDeveloper MIT License 4 | 5 | //Copyright (c) 2007 ArcDeveoper.net 6 | //Permission is hereby granted, free of charge, to any person obtaining a copy 7 | //of this software and associated documentation files (the "Software"), to deal 8 | //in the Software without restriction, including without limitation the rights 9 | //to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | //copies of the Software, and to permit persons to whom the Software is 11 | //furnished to do so, subject to the following conditions: 12 | //The above copyright notice and this permission notice shall be included in 13 | //all copies or substantial portions of the Software. 14 | //THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | //LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | //THE SOFTWARE. 21 | 22 | #endregion 23 | 24 | //====================================================== 25 | // Author: ggoodrich 26 | // Date Created: 2/8/2008 8:27:37 AM 27 | //====================================================== 28 | // Author: ggoodrich 29 | // Date Created: 2/8/2008 8:27:37 AM 30 | // Description: 31 | // 32 | //====================================================== 33 | using System.Runtime.Serialization; 34 | using System.Text; 35 | using ESRI.ArcGIS.Geodatabase; 36 | 37 | 38 | 39 | namespace ArcDeveloper 40 | { 41 | /// 42 | /// Represents a GeoJSON feature, per the GeoJSON spec 43 | /// 44 | [DataContract] 45 | public class GeoJSONFeature 46 | { 47 | 48 | 49 | private GeoJSONGeometry _geometry; 50 | private string _id; 51 | private string _properties; 52 | public string Type { get; set; } 53 | 54 | 55 | 56 | /// 57 | /// Default Constructor 58 | /// 59 | /// 60 | public GeoJSONFeature() 61 | { 62 | Type = "Feature"; 63 | } 64 | 65 | 66 | /// 67 | /// The ID of the feature 68 | /// 69 | /// The id. 70 | [DataMember] 71 | public string id 72 | { 73 | get { return _id; } 74 | set { _id = value; } 75 | } 76 | /// 77 | /// The geometry of the feature 78 | /// 79 | /// The geometry. 80 | [DataMember] 81 | public GeoJSONGeometry geometry 82 | { 83 | get { return _geometry; } 84 | set { _geometry = value; } 85 | } 86 | /// 87 | /// Gets or sets the properties. 88 | /// 89 | /// The properties. 90 | [DataMember] 91 | public string properties 92 | { 93 | get { return _properties; } 94 | set { _properties = value; } 95 | } 96 | 97 | 98 | /// 99 | /// Creates A GeoJSON feature from an IFeature 100 | /// 101 | /// The feature. 102 | /// A GeoJSON Feature 103 | public static GeoJSONFeature CreateFromIFeature(IFeature feat) 104 | { 105 | GeoJSONFeature jsonFeature = new GeoJSONFeature(); 106 | jsonFeature.id = feat.OID.ToString(); 107 | jsonFeature.geometry = GeoJSONGeometry.CreateFromIGeometry(feat.Shape); 108 | StringBuilder sb = new StringBuilder(); 109 | sb.Append("{"); 110 | 111 | for (int i = 0; i < feat.Fields.FieldCount; i++) 112 | { 113 | ESRI.ArcGIS.Geodatabase.IField fld = feat.Fields.get_Field(i); 114 | switch (fld.Name.ToUpper()) 115 | { 116 | case "SHAPE": 117 | break; 118 | default: 119 | string val = "null"; 120 | if (feat.get_Value(i) != null) 121 | val = feat.get_Value(i).ToString(); 122 | if(sb.Length > 1) 123 | sb.Append(","); 124 | sb.Append(string.Format("\"{0}\":\"{1}\"", fld.Name, val)); 125 | 126 | break; 127 | } 128 | } 129 | 130 | jsonFeature.properties = sb.ToString(); 131 | sb.Append("}"); 132 | jsonFeature.properties = sb.ToString(); 133 | return jsonFeature; 134 | } 135 | 136 | 137 | 138 | 139 | } 140 | } -------------------------------------------------------------------------------- /VectorCache/RegisterArcStacheSOE/Program.cs: -------------------------------------------------------------------------------- 1 | // Copyright 2010 ESRI 2 | // 3 | // All rights reserved under the copyright laws of the United States 4 | // and applicable international laws, treaties, and conventions. 5 | // 6 | // You may freely redistribute and use this sample code, with or 7 | // without modification, provided you include the original copyright 8 | // notice and use restrictions. 9 | // 10 | // See the use restrictions at <your ArcGIS install location>/DeveloperKit10.0/userestrictions.txt. 11 | // 12 | 13 | using System; 14 | using System.Collections.Generic; 15 | using System.Linq; 16 | using System.Text; 17 | 18 | namespace RegisterArcStacheSOE 19 | { 20 | class Program 21 | { 22 | static void Main(string[] args) 23 | { 24 | // Must run as an user in the agsadmin group on the SOM 25 | ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection agsServerConnection = 26 | new ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection(); 27 | agsServerConnection.Host = "localhost"; 28 | agsServerConnection.Connect(); 29 | ESRI.ArcGIS.Server.IServerObjectAdmin2 serverObjectAdmin = 30 | agsServerConnection.ServerObjectAdmin as ESRI.ArcGIS.Server.IServerObjectAdmin2; 31 | 32 | // This name must match those defined for property pages 33 | string extensionName = "arcstache"; 34 | 35 | // Check command line arguments to see if SOE is to be unregistered 36 | if (args.Length == 1 && args[0] == "/unregister") 37 | { 38 | // Check whether the SOE is registered 39 | if (ExtensionRegistered(serverObjectAdmin, extensionName)) 40 | { 41 | // Delete the SOE 42 | serverObjectAdmin.DeleteExtensionType("MapServer", extensionName); 43 | Console.WriteLine(extensionName + " successfully unregistered"); 44 | } 45 | else 46 | Console.WriteLine(extensionName + " is not registered with ArcGIS Server"); 47 | } 48 | else 49 | { 50 | // Check whether the SOE is registered 51 | if (!ExtensionRegistered(serverObjectAdmin, extensionName)) 52 | { 53 | // Use IServerObjectExtensionType3 to get access to info properties 54 | ESRI.ArcGIS.Server.IServerObjectExtensionType3 serverObjectExtensionType = 55 | serverObjectAdmin.CreateExtensionType() as ESRI.ArcGIS.Server.IServerObjectExtensionType3; 56 | 57 | // Must match the namespace and class name of the class implementing IServerObjectExtension 58 | serverObjectExtensionType.CLSID = "ArcStache.ArcStache"; 59 | //serverObjectExtensionType.CLSID = "{91EB05FE-7970-45F3-A51B-664310938EFF}"; 60 | serverObjectExtensionType.Description = "ArcStache creates a tile cache of vector data in ArcGIS Server JSON and GeoJSON formats"; 61 | serverObjectExtensionType.Name = extensionName; 62 | 63 | // Name that will be shown in the capabilities list on property pages 64 | serverObjectExtensionType.DisplayName = "ArcStache"; 65 | 66 | // Use info properties to define capabilities and msd support 67 | serverObjectExtensionType.Info.SetProperty("SupportsMSD", "true"); 68 | 69 | // Required to enable exposure of SOE with ArcGIS Server REST endpoint 70 | serverObjectExtensionType.Info.SetProperty("SupportsREST", "true"); 71 | 72 | // Register the SOE with the server 73 | serverObjectAdmin.AddExtensionType("MapServer", serverObjectExtensionType); 74 | 75 | Console.WriteLine(extensionName + " successfully registered with ArcGIS Server"); 76 | } 77 | else 78 | Console.WriteLine(extensionName + " is already registered with ArcGIS Server"); 79 | } 80 | 81 | Console.ReadLine(); 82 | } 83 | 84 | // Checks whether an extension with the passed-in name is already registered with the passed-in server 85 | static private bool ExtensionRegistered(ESRI.ArcGIS.Server.IServerObjectAdmin2 serverObjectAdmin, string extensionName) 86 | { 87 | // Get the extensions that extend MapServer server objects 88 | ESRI.ArcGIS.Server.IEnumServerObjectExtensionType extensionTypes = serverObjectAdmin.GetExtensionTypes("MapServer"); 89 | extensionTypes.Reset(); 90 | 91 | // If an extension with a name matching that passed-in is found, return true 92 | ESRI.ArcGIS.Server.IServerObjectExtensionType extensionType = extensionTypes.Next(); 93 | while (extensionType != null) 94 | { 95 | if (extensionType.Name == extensionName) 96 | return true; 97 | 98 | extensionType = extensionTypes.Next(); 99 | } 100 | 101 | // No matching extension was found, so return false 102 | return false; 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/src/com/dtsagile/ags/utils/ColorUtil.as: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2011 DTSAgile 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | // 21 | ////////////////////////////////////////////////////////////////////////////////////// 22 | package com.dtsagile.ags.utils 23 | { 24 | /** 25 | * Utility class for working with colors. 26 | * 27 | * @author jgermain 28 | * 29 | */ 30 | public class ColorUtil 31 | { 32 | /** 33 | * Extracts the RGB values into an array of numbers; each 0-255. 34 | * 35 | * @param color The color to be 36 | * @return Returns an array of RGB values 37 | * 38 | */ 39 | public static function toRgbArray(color:uint):Array 40 | { 41 | var r:Number = (color >> 16) & 0xFF; 42 | var g:Number = (color >> 8) & 0xFF; 43 | var b:Number = color & 0xFF; 44 | 45 | return [r,g,b]; 46 | } 47 | 48 | public static function getRandomColor():uint 49 | { 50 | return 0x000000 + Math.random() * 0xFFFFFF; 51 | } 52 | 53 | /** 54 | * Blends smoothly from one color value to another. 55 | * This method written by Adobe as part of fl.motion.Color 56 | * http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/motion/Color.html#interpolateColor() 57 | * 58 | * @param fromColor The starting color value, in the 0xRRGGBB or 0xAARRGGBB format. 59 | * @param toColor The ending color value, in the 0xRRGGBB or 0xAARRGGBB format. 60 | * @param progress The percent of the transition as a decimal, where 0 is the start and 1 is the end. 61 | * @return The interpolated color value, in the 0xRRGGBB or 0xAARRGGBB format. 62 | * 63 | */ 64 | public static function interpolateColor(fromColor:uint, toColor:uint, progress:Number):uint 65 | { 66 | var q:Number = 1-progress; 67 | var fromA:uint = (fromColor >> 24) & 0xFF; 68 | var fromR:uint = (fromColor >> 16) & 0xFF; 69 | var fromG:uint = (fromColor >> 8) & 0xFF; 70 | var fromB:uint = fromColor & 0xFF; 71 | 72 | var toA:uint = (toColor >> 24) & 0xFF; 73 | var toR:uint = (toColor >> 16) & 0xFF; 74 | var toG:uint = (toColor >> 8) & 0xFF; 75 | var toB:uint = toColor & 0xFF; 76 | 77 | var resultA:uint = fromA*q + toA*progress; 78 | var resultR:uint = fromR*q + toR*progress; 79 | var resultG:uint = fromG*q + toG*progress; 80 | var resultB:uint = fromB*q + toB*progress; 81 | var resultColor:uint = resultA << 24 | resultR << 16 | resultG << 8 | resultB; 82 | return resultColor; 83 | } 84 | 85 | 86 | /** 87 | * Returns an array of colors between and including Hex1 and Hex2. 88 | * This method was adapted from code written by PiXELWiT and obtained from 89 | * http://www.pixelwit.com/blog/2008/05/color-fading-array/ 90 | * 91 | * @param fromColor The starting color value, in the 0xRRGGBB 92 | * @param toColor The ending color value, in the 0xRRGGBB 93 | * @param steps The number of steps in output color ramp 94 | * @return Array containing ramped colors including and between the from and 95 | * to colors. 96 | * 97 | */ 98 | public static function createColorRamp (fromColor:uint, toColor:uint, steps:Number):Array 99 | { 100 | // 101 | // Create an array to store all colors. 102 | var rampColors:Array = [fromColor]; 103 | // 104 | // Break fromColor into RGB components. 105 | var r:uint = fromColor >> 16; 106 | var g:uint = fromColor >> 8 & 0xFF; 107 | var b:uint = fromColor & 0xFF; 108 | // 109 | // Determine RGB differences between fromColor and toColor. 110 | var rd:uint = (toColor >> 16)-r; 111 | var gd:uint = (toColor >> 8 & 0xFF)-g; 112 | var bd:uint = (toColor & 0xFF)-b; 113 | // 114 | steps++; 115 | // For each new color. 116 | for (var i:int=1; i 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.21022 7 | 2.0 8 | {5157ED9F-8B35-4822-8B0F-3D48AE023434} 9 | {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | Library 11 | Properties 12 | ArcStache.Tests 13 | ArcStache.Tests 14 | v4.0 15 | 512 16 | 17 | 18 | 4.0 19 | 20 | publish\ 21 | true 22 | Disk 23 | false 24 | Foreground 25 | 7 26 | Days 27 | false 28 | false 29 | true 30 | 0 31 | 1.0.0.%2a 32 | false 33 | false 34 | true 35 | 36 | 37 | true 38 | full 39 | false 40 | bin\Debug\ 41 | DEBUG;TRACE 42 | prompt 43 | 4 44 | 45 | 46 | pdbonly 47 | true 48 | bin\Release\ 49 | TRACE 50 | prompt 51 | 4 52 | 53 | 54 | 55 | True 56 | 57 | 58 | True 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 3.5 70 | 71 | 72 | 3.5 73 | 74 | 75 | 3.5 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | {B3571916-DFBC-4652-9C1B-058AE3C24E39} 85 | ArcStache 86 | 87 | 88 | 89 | 90 | False 91 | Microsoft .NET Framework 4 %28x86 and x64%29 92 | true 93 | 94 | 95 | False 96 | .NET Framework 3.5 SP1 Client Profile 97 | false 98 | 99 | 100 | False 101 | .NET Framework 3.5 SP1 102 | false 103 | 104 | 105 | False 106 | Windows Installer 3.1 107 | true 108 | 109 | 110 | 111 | 118 | -------------------------------------------------------------------------------- /VectorCache.Tests/VectorCache.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.21022 7 | 2.0 8 | {AC22DC3A-FD9B-4DB8-8ED7-B7A6051A00FB} 9 | {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | Library 11 | Properties 12 | VectorCache.Tests 13 | VectorCache.Tests 14 | v4.0 15 | 512 16 | 17 | 18 | 4.0 19 | 20 | publish\ 21 | true 22 | Disk 23 | false 24 | Foreground 25 | 7 26 | Days 27 | false 28 | false 29 | true 30 | 0 31 | 1.0.0.%2a 32 | false 33 | false 34 | true 35 | 36 | 37 | true 38 | full 39 | false 40 | bin\Debug\ 41 | DEBUG;TRACE 42 | prompt 43 | 4 44 | 45 | 46 | pdbonly 47 | true 48 | bin\Release\ 49 | TRACE 50 | prompt 51 | 4 52 | 53 | 54 | 55 | False 56 | True 57 | 58 | 59 | False 60 | True 61 | 62 | 63 | False 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 3.5 74 | 75 | 76 | 3.5 77 | 78 | 79 | 3.5 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | {886D6C1B-2887-45E0-8347-58863ACE0DF6} 89 | VectorCache 90 | 91 | 92 | 93 | 94 | False 95 | Microsoft .NET Framework 4 %28x86 and x64%29 96 | true 97 | 98 | 99 | False 100 | .NET Framework 3.5 SP1 Client Profile 101 | false 102 | 103 | 104 | False 105 | .NET Framework 3.5 SP1 106 | false 107 | 108 | 109 | False 110 | Windows Installer 3.1 111 | true 112 | 113 | 114 | 115 | 122 | -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/html-template/index.template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 14 | ${title} 15 | 16 | 21 | 27 | 28 | 29 | 33 | 34 | 35 | 58 | 59 | 60 | 64 |
65 |

66 | To view this page ensure that Adobe Flash Player version 67 | ${version_major}.${version_minor}.${version_revision} or greater is installed. 68 |

69 | 74 |
75 | 76 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /VectorCache/Backup/InMemoryGISLayer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DTS.Common.GIS 6 | { 7 | public abstract class InMemoryGISLayer: IGISLayer, IGISEditableLayer 8 | { 9 | List _features = new List(); 10 | string _layerName; 11 | string _keyFieldName; 12 | int _index = -1; 13 | InMemoryGISFeature _current; 14 | 15 | public InMemoryGISLayer(string layerName, string keyFieldName) 16 | { 17 | _layerName = layerName; 18 | _keyFieldName = keyFieldName; 19 | } 20 | 21 | public InMemoryGISLayer(IEnumerable features, string layerName, string keyFieldName) 22 | { 23 | _features = new List(features); 24 | _layerName = layerName; 25 | _keyFieldName = keyFieldName; 26 | } 27 | public abstract InMemoryGISFeature CreateFeature(); 28 | 29 | #region IGISLayer Members 30 | 31 | public string LayerName 32 | { 33 | get { return _layerName; } 34 | } 35 | 36 | public string KeyFieldName 37 | { 38 | get { return _keyFieldName; } 39 | } 40 | 41 | public IGISFeature Current 42 | { 43 | get 44 | { 45 | return _current; 46 | } 47 | } 48 | 49 | public bool MoveNext() 50 | { 51 | if (++_index >= _features.Count) 52 | { 53 | return false; 54 | } 55 | else 56 | { 57 | _current = _features[_index]; 58 | return true; 59 | } 60 | } 61 | 62 | public void Search(string queryString) 63 | { 64 | throw new Exception("The method or operation is not implemented."); 65 | } 66 | 67 | #endregion 68 | 69 | #region IGISXMLSerializable Members 70 | 71 | public void ToXML(System.Xml.XmlWriter writer) 72 | { 73 | throw new Exception("The method or operation is not implemented."); 74 | } 75 | 76 | public void FromXML(System.Xml.XmlReader reader) 77 | { 78 | throw new Exception("The method or operation is not implemented."); 79 | } 80 | 81 | #endregion 82 | 83 | #region IGISJSONSerializable Members 84 | 85 | public void ToJSON(Jayrock.Json.JsonTextWriter jwriter) 86 | { 87 | GeoJSONWriter.Write(this, jwriter); 88 | } 89 | 90 | public void FromJSON(Jayrock.Json.JsonTextReader jreader) 91 | { 92 | throw new Exception("The method or operation is not implemented."); 93 | } 94 | 95 | #endregion 96 | 97 | #region IGISEditableLayer Members 98 | 99 | public void Add(IGISFeature feature) 100 | { 101 | if (feature == null) 102 | throw new ArgumentNullException("feature", "A valid feature is required to be added."); 103 | 104 | if (_features == null) 105 | throw new NullReferenceException("Cannot add feature to the InMemoryLayer. The internal list reference is NULL."); 106 | 107 | if(FindByKeyValue(_features, feature.Attributes.GetValue(KeyFieldName)) != null) 108 | throw new ArgumentException("Cannot add feature. A feature with the same key already exists."); 109 | 110 | InMemoryGISFeature newFeature = CreateFeature(); 111 | _features.Add(newFeature); 112 | 113 | newFeature.Shape = feature.Shape; 114 | 115 | foreach (string key in feature.Attributes.GetKeys()) 116 | { 117 | newFeature.Attributes.SetValue(key, feature.Attributes.GetValue(key)); 118 | } 119 | } 120 | 121 | public void Update(IGISFeature feature) 122 | { 123 | if (feature == null) 124 | throw new ArgumentNullException("feature", "A valid feature is required to be added."); 125 | 126 | if (_features == null) 127 | throw new NullReferenceException("Cannot update feature to the InMemoryLayer. The internal list reference is NULL."); 128 | 129 | if (FindByKeyValue(_features, feature.Attributes.GetValue(KeyFieldName)) != null) 130 | throw new ArgumentException("Cannot update feature. A feature with the same key already exists."); 131 | 132 | InMemoryGISFeature updateFeature = FindByKeyValue(_features, feature.Attributes.GetValue(KeyFieldName)); 133 | if (updateFeature == null) 134 | throw new ArgumentException("Could not update the InMemoryLayer. The feature was not found in the internal list."); 135 | 136 | updateFeature.Shape = feature.Shape; 137 | 138 | foreach (string key in feature.Attributes.GetKeys()) 139 | { 140 | updateFeature.Attributes.SetValue(key, feature.Attributes.GetValue(key)); 141 | } 142 | } 143 | 144 | public void Delete(IGISFeature feature) 145 | { 146 | if (feature == null) 147 | throw new ArgumentNullException("feature", "A valid feature is required to be added."); 148 | 149 | if (_features == null) 150 | throw new NullReferenceException("Cannot delete feature from the InMemoryLayer. The internal list reference is NULL."); 151 | 152 | InMemoryGISFeature mc = FindByKeyValue(_features, feature.Attributes.GetValue(KeyFieldName)); 153 | 154 | if (mc != null) 155 | { 156 | _features.Remove(mc); 157 | } 158 | } 159 | 160 | #endregion 161 | 162 | private InMemoryGISFeature FindByKeyValue(List features, object id) 163 | { 164 | foreach (InMemoryGISFeature item in features) 165 | { 166 | if (id == item.Attributes.GetValue(KeyFieldName)) 167 | return item; 168 | } 169 | return null; 170 | } 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/src/com/esri/ags/samples/PortlandTiledMapServiceLayer.as: -------------------------------------------------------------------------------- 1 | package com.esri.ags.samples 2 | { 3 | 4 | import com.esri.ags.SpatialReference; 5 | import com.esri.ags.geometry.Extent; 6 | import com.esri.ags.geometry.MapPoint; 7 | import com.esri.ags.layers.supportClasses.LOD; 8 | import com.esri.ags.layers.supportClasses.TileInfo; 9 | import com.esri.ags.layers.TiledMapServiceLayer; 10 | 11 | import flash.net.URLRequest; 12 | 13 | /** 14 | * PortlandTiledMapServiceLayer 15 | */ 16 | public class PortlandTiledMapServiceLayer extends TiledMapServiceLayer 17 | { 18 | //-------------------------------------------------------------------------- 19 | // 20 | // Constructor 21 | // 22 | //-------------------------------------------------------------------------- 23 | 24 | /** 25 | * Creates a new PortlandTiledMapServiceLayer object. 26 | */ 27 | public function PortlandTiledMapServiceLayer() 28 | { 29 | super(); 30 | 31 | buildTileInfo(); // to create our hardcoded tileInfo 32 | 33 | setLoaded(true); // Map will only use loaded layers 34 | } 35 | 36 | //-------------------------------------------------------------------------- 37 | // 38 | // Variables 39 | // 40 | //-------------------------------------------------------------------------- 41 | 42 | private var _tileInfo:TileInfo = new TileInfo(); // see buildTileInfo() 43 | private var _baseURL:String = "http://sampleserver1.arcgisonline.com/arcgiscache/Portland_Portland_ESRI_LandBase_AGO/Portland/_alllayers"; 44 | 45 | //-------------------------------------------------------------------------- 46 | // 47 | // Overridden properties 48 | // fullExtent() 49 | // initialExtent() 50 | // spatialReference() 51 | // tileInfo() 52 | // units() 53 | // 54 | //-------------------------------------------------------------------------- 55 | 56 | 57 | //---------------------------------- 58 | // fullExtent 59 | // - required to calculate the tiles to use 60 | //---------------------------------- 61 | 62 | override public function get fullExtent():Extent 63 | { 64 | trace('fullExtent'); 65 | return new Extent(-123.596895130725, 44.297575737946, -121.553757125519, 46.3683237161949, new SpatialReference(4326)); 66 | } 67 | 68 | //---------------------------------- 69 | // initialExtent 70 | // - needed if Map doesn't have an extent 71 | //---------------------------------- 72 | 73 | override public function get initialExtent():Extent 74 | { 75 | trace('initialExtent'); 76 | return new Extent(-122.539, 45.500, -122.540, 45.501, new SpatialReference(4326)); 77 | } 78 | 79 | //---------------------------------- 80 | // spatialReference 81 | // - needed if Map doesn't have a spatialReference 82 | //---------------------------------- 83 | 84 | override public function get spatialReference():SpatialReference 85 | { 86 | trace('spatialReference'); 87 | return new SpatialReference(4326); 88 | } 89 | 90 | //---------------------------------- 91 | // tileInfo 92 | //---------------------------------- 93 | 94 | override public function get tileInfo():TileInfo 95 | { 96 | trace('tileInfo'); 97 | return _tileInfo; 98 | } 99 | 100 | //---------------------------------- 101 | // units 102 | // - needed if Map doesn't have it set 103 | //---------------------------------- 104 | 105 | override public function get units():String 106 | { 107 | trace('units'); 108 | return "esriDecimalDegrees"; 109 | } 110 | 111 | //-------------------------------------------------------------------------- 112 | // 113 | // Overridden methods 114 | // getTileURL(level:Number, row:Number, col:Number):URLRequest 115 | // 116 | //-------------------------------------------------------------------------- 117 | 118 | override protected function getTileURL(level:Number, row:Number, col:Number):URLRequest 119 | { 120 | trace('getTileURL'); 121 | // Use virtual cache directory 122 | // This assumes the cache's virtual directory is exposed, which allows you access 123 | // to tile from the Web server via the public cache directory. 124 | // Example of a URL for a tile retrieved from the virtual cache directory: 125 | // http://serverx.esri.com/arcgiscache/dgaerials/Layers/_alllayers/L01/R0000051f/C000004e4.jpg 126 | var url:String = _baseURL 127 | + "/L" + padString(String(level), 2, "0") 128 | + "/R" + padString(row.toString(16), 8, "0") 129 | + "/C" + padString(col.toString(16), 8, "0") + ".png"; 130 | trace(url); 131 | return new URLRequest(url); 132 | } 133 | 134 | //-------------------------------------------------------------------------- 135 | // 136 | // Private Methods 137 | // 138 | //-------------------------------------------------------------------------- 139 | 140 | private function buildTileInfo():void 141 | { 142 | _tileInfo.height = 512; 143 | _tileInfo.width = 512; 144 | _tileInfo.origin = new MapPoint(-180, 90); 145 | _tileInfo.spatialReference = new SpatialReference(4326); 146 | _tileInfo.lods = 147 | [ 148 | new LOD(0, 0.351562499999999, 147748799.285417), 149 | new LOD(1, 0.17578125, 73874399.6427087), 150 | new LOD(2, 0.0878906250000001, 36937199.8213544), 151 | new LOD(3, 0.0439453125, 18468599.9106772), 152 | new LOD(4, 0.02197265625, 9234299.95533859), 153 | new LOD(5, 0.010986328125, 4617149.97766929), 154 | new LOD(6, 0.0054931640625, 2308574.98883465), 155 | new LOD(7, 0.00274658203124999, 1154287.49441732), 156 | new LOD(8, 0.001373291015625, 577143.747208662), 157 | new LOD(9, 0.0006866455078125, 288571.873604331), 158 | new LOD(10, 0.000343322753906249, 144285.936802165), 159 | new LOD(11, 0.000171661376953125, 72142.9684010827), 160 | new LOD(12, 0.0000858306884765626, 36071.4842005414), 161 | new LOD(13, 0.0000429153442382813, 18035.7421002707), 162 | new LOD(14, 0.0000214576721191406, 9017.87105013534), 163 | new LOD(15, 0.0000107288360595703, 4508.93552506767) 164 | ]; 165 | } 166 | 167 | private function padString(text:String, size:int, ch:String):String 168 | { 169 | while (text.length < size) 170 | { 171 | text = ch + text; 172 | } 173 | return text; 174 | } 175 | } 176 | 177 | } -------------------------------------------------------------------------------- /VectorCache/ArcStache/ArcStache.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.30729 7 | 2.0 8 | {B3571916-DFBC-4652-9C1B-058AE3C24E39} 9 | Library 10 | Properties 11 | ArcStache 12 | ArcStache 13 | v3.5 14 | 512 15 | false 16 | 17 | 18 | 19 | 20 | 3.5 21 | 22 | publish\ 23 | true 24 | Disk 25 | false 26 | Foreground 27 | 7 28 | Days 29 | false 30 | false 31 | true 32 | 0 33 | 1.0.0.%2a 34 | false 35 | false 36 | true 37 | 38 | 39 | true 40 | full 41 | false 42 | bin\Debug\ 43 | DEBUG;TRACE 44 | prompt 45 | 4 46 | x86 47 | 48 | 49 | pdbonly 50 | true 51 | bin\Release\ 52 | TRACE 53 | prompt 54 | 4 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | False 63 | ..\..\..\..\..\ArcGIS\bin\ESRI.ArcGIS.SOESupport.dll 64 | 65 | 66 | 67 | 68 | 3.5 69 | 70 | 71 | 72 | 73 | 3.5 74 | 75 | 76 | 3.5 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | False 106 | .NET Framework 3.5 SP1 Client Profile 107 | false 108 | 109 | 110 | False 111 | .NET Framework 3.5 SP1 112 | true 113 | 114 | 115 | False 116 | Windows Installer 3.1 117 | true 118 | 119 | 120 | 121 | 128 | -------------------------------------------------------------------------------- /VectorCache/ArcStache/ArcDeveloper/GeoJSONGeometry.cs: -------------------------------------------------------------------------------- 1 | //====================================================== 2 | #region ArcDeveloper MIT License 3 | //Copyright (c) 2007 ArcDeveoper.net 4 | //Permission is hereby granted, free of charge, to any person obtaining a copy 5 | //of this software and associated documentation files (the "Software"), to deal 6 | //in the Software without restriction, including without limitation the rights 7 | //to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | //copies of the Software, and to permit persons to whom the Software is 9 | //furnished to do so, subject to the following conditions: 10 | //The above copyright notice and this permission notice shall be included in 11 | //all copies or substantial portions of the Software. 12 | //THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | //IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | //FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | //AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | //LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | //OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 18 | //THE SOFTWARE. 19 | #endregion 20 | //====================================================== 21 | // Author: ggoodrich 22 | // Date Created: 2/8/2008 8:28:53 AM 23 | //====================================================== 24 | // Author: ggoodrich 25 | // Date Created: 2/8/2008 8:28:53 AM 26 | // Description: 27 | // 28 | //====================================================== 29 | using System; 30 | using System.Collections.Generic; 31 | using System.Runtime.Serialization; 32 | using System.Text; 33 | //using ArcDeveloper.REST.Core.Interfaces; 34 | using ArcDeveloper.REST.Core.Model; 35 | using ESRI.ArcGIS.Geometry; 36 | 37 | namespace ArcDeveloper 38 | { 39 | /// 40 | /// 41 | /// 42 | [DataContract] 43 | public class GeoJSONGeometry:GeoJSONResponse 44 | { 45 | 46 | private string _coordinates; 47 | 48 | /// 49 | /// Default Constructor 50 | /// 51 | /// 52 | public GeoJSONGeometry() 53 | { 54 | 55 | } 56 | 57 | 58 | 59 | 60 | [DataMember] 61 | public string coordinates 62 | { 63 | get 64 | { 65 | 66 | return _coordinates; 67 | } 68 | set { _coordinates = value; } 69 | } 70 | 71 | /// 72 | /// Create a geojson string from the geometry 73 | /// 74 | /// 75 | /// 76 | public static GeoJSONGeometry CreateFromIGeometry(IGeometry geometry) 77 | { 78 | GeoJSONGeometry jsonGeom = new GeoJSONGeometry(); 79 | jsonGeom.Type = geometry.GeometryType.ToString(); 80 | StringBuilder sb = new StringBuilder(); 81 | if (geometry.GeometryType!=esriGeometryType.esriGeometryPoint) 82 | { 83 | sb.Append("["); 84 | } 85 | //Need to work out how to easily rip the coords out of the IGeometry 86 | 87 | switch(geometry.GeometryType) 88 | { 89 | case esriGeometryType.esriGeometryPoint: 90 | IPoint pt = (IPoint)geometry; 91 | sb.Append( string.Format("[{0}, {1}]", Math.Round(pt.X, 5), Math.Round(pt.Y, 5))); 92 | jsonGeom.Type = "Point"; 93 | break; 94 | 95 | case esriGeometryType.esriGeometryLine: 96 | IPolyline line = geometry as IPolyline; 97 | if (line == null) return null; 98 | 99 | line.Densify(-1, -1); //make sure it's all straight line segments 100 | line.Weed(20); //weed out some vertices 101 | line.SimplifyNetwork(); //make sure it is simple 102 | 103 | 104 | IPointCollection points = line as IPointCollection; 105 | for (int i = 0; i < points.PointCount; i++) 106 | { 107 | IPoint point = points.get_Point(i); 108 | if (sb.Length > 1) 109 | sb.Append(","); 110 | sb.Append(string.Format("[{0}, {1}]", Math.Round(point.X, 4), Math.Round(point.Y, 4))); 111 | } 112 | 113 | jsonGeom.Type = "LineString"; 114 | break; 115 | 116 | case esriGeometryType.esriGeometryPolygon: 117 | IPolygon4 poly = geometry as IPolygon4; 118 | if (poly == null) return null; 119 | 120 | poly.Densify(-1, -1); //make sure it is all straight line segments 121 | poly.Weed(20); //weed out some vertices 122 | poly.SimplifyPreserveFromTo(); //make sure it's simple 123 | 124 | //We aren't gonna deal with interior rings right now (ie - no holes in polygons) 125 | IGeometryBag multiRing = poly.ExteriorRingBag; 126 | IEnumGeometry exteriorRingsEnum = multiRing as IEnumGeometry; 127 | exteriorRingsEnum.Reset(); 128 | IRing currentExteriorRing = exteriorRingsEnum.Next() as IRing; 129 | while (currentExteriorRing != null) 130 | { 131 | 132 | if (!currentExteriorRing.IsClosed) currentExteriorRing.Close(); 133 | 134 | IPointCollection multiRingPoints = currentExteriorRing as IPointCollection; 135 | for (int pointIdx = 0; pointIdx < multiRingPoints.PointCount; pointIdx++) 136 | { 137 | IPoint multiRingPoint = multiRingPoints.get_Point(pointIdx); 138 | //coords.Add(new GisSharpBlog.NetTopologySuite.Geometries.Coordinate(Math.Round(multiRingPoint.X, 5), Math.Round(multiRingPoint.Y, 5))); 139 | if (sb.Length > 1) 140 | sb.Append(","); 141 | sb.Append(string.Format("[{0}, {1}]", Math.Round(multiRingPoint.X, 4), Math.Round(multiRingPoint.Y, 4))); 142 | } 143 | 144 | currentExteriorRing = exteriorRingsEnum.Next() as IRing; 145 | } 146 | jsonGeom.Type = "Polygon"; 147 | break; 148 | 149 | } 150 | 151 | 152 | if (geometry.GeometryType != esriGeometryType.esriGeometryPoint) 153 | { 154 | sb.Append("]"); 155 | } 156 | jsonGeom.coordinates = sb.ToString(); 157 | return jsonGeom; 158 | } 159 | 160 | 161 | 162 | 163 | 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/src/com/dtsagile/ags/renderers/ColorRampRenderer.as: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2011 DTSAgile 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | // 21 | ////////////////////////////////////////////////////////////////////////////////////// 22 | package com.dtsagile.ags.renderers 23 | { 24 | import com.dtsagile.ags.utils.ColorUtil; 25 | import com.esri.ags.Graphic; 26 | import com.esri.ags.geometry.Geometry; 27 | import com.esri.ags.renderers.SimpleRenderer; 28 | import com.esri.ags.renderers.UniqueValueRenderer; 29 | import com.esri.ags.renderers.supportClasses.UniqueValueInfo; 30 | import com.esri.ags.symbols.SimpleFillSymbol; 31 | import com.esri.ags.symbols.SimpleLineSymbol; 32 | import com.esri.ags.symbols.SimpleMarkerSymbol; 33 | import com.esri.ags.symbols.Symbol; 34 | import com.esri.utils.Hashtable; 35 | 36 | import mx.utils.UIDUtil; 37 | 38 | public class ColorRampRenderer extends SimpleRenderer 39 | { 40 | private var _symbols:Hashtable = new Hashtable(); 41 | private var _seeds:Array = new Array(); 42 | 43 | private var _fromColor:uint = 0x00FFFF; 44 | 45 | private var _toColor:uint = 0x000099; 46 | 47 | public function ColorRampRenderer(attribute:String = null, fromColor:uint = NaN, toColor:uint = NaN, numSteps:Number = NaN, defaultSymbol:Symbol = null) 48 | { 49 | super(symbol); 50 | 51 | this.attribute = attribute; 52 | 53 | this.numSteps = numSteps; 54 | 55 | if(!isNaN(fromColor) && fromColor > 0) 56 | { 57 | this.fromColor = fromColor; 58 | } 59 | 60 | if(!isNaN(toColor) && toColor > 0) 61 | { 62 | this.toColor = toColor; 63 | } 64 | } 65 | 66 | //-------------------------------------------------------------------------- 67 | // 68 | // Public Properties 69 | // attribute:String; 70 | // fromColor:uint 71 | // toColor:uint 72 | // 73 | //-------------------------------------------------------------------------- 74 | 75 | public var attribute:String; 76 | public var numSteps:Number; 77 | 78 | public function get toColor():uint 79 | { 80 | return _toColor; 81 | } 82 | 83 | public function set toColor(value:uint):void 84 | { 85 | if(!isNaN(value)) 86 | { 87 | _toColor = value; 88 | } 89 | } 90 | 91 | public function get fromColor():uint 92 | { 93 | return _fromColor; 94 | } 95 | 96 | public function set fromColor(value:uint):void 97 | { 98 | if(!isNaN(value)) 99 | { 100 | _fromColor = value; 101 | } 102 | } 103 | 104 | //-------------------------------------------------------------------------- 105 | // 106 | // Overridden methods 107 | // getSymbol(graphic:Graphic):Symbol 108 | // 109 | //-------------------------------------------------------------------------- 110 | 111 | private var _colorRamp:Array = null; 112 | public override function getSymbol(graphic:Graphic):Symbol 113 | { 114 | // Keeping it simple... 115 | // If attribute supplied, then we roll a "unique value renderer", 116 | // Otherwise, each graphic gets a random color 117 | 118 | var symbol:Symbol = null; 119 | 120 | // Cache our symbols so when layer props are invalidated, we don't apply new colors! 121 | var symbolKey:String = null; 122 | if(this.attribute && graphic.attributes.hasOwnProperty(this.attribute)) 123 | { 124 | // Unique value renderer 125 | symbolKey = graphic.attributes[this.attribute]; 126 | } 127 | else 128 | { 129 | // Simple renderer 130 | symbolKey = UIDUtil.getUID(graphic); 131 | } 132 | 133 | 134 | if(_symbols.find(symbolKey)) 135 | { 136 | symbol = _symbols.find(symbolKey); 137 | } 138 | else 139 | { 140 | var rampColor:uint; 141 | if(this.numSteps > 0 && _symbols.size <= this.numSteps) 142 | { 143 | if(!_colorRamp) 144 | { 145 | _colorRamp = ColorUtil.createColorRamp(this.fromColor, this.toColor, this.numSteps); 146 | } 147 | rampColor = _colorRamp[_symbols.size]; 148 | } 149 | else 150 | { 151 | var seed:Number = this.getSeed(); 152 | rampColor = ColorUtil.interpolateColor(this.fromColor, this.toColor, seed); 153 | } 154 | symbol = this.getSymbolByGeometryType(graphic.geometry.type, rampColor); 155 | _symbols.add(symbolKey, symbol); 156 | 157 | } 158 | 159 | return symbol; 160 | } 161 | 162 | private function getSymbolByGeometryType(geometryType:String, color:uint):Symbol 163 | { 164 | var symbol:Symbol = null; 165 | 166 | switch(geometryType) 167 | { 168 | case Geometry.MAPPOINT: 169 | case Geometry.MULTIPOINT: 170 | symbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 15, color, 1, 0, 0, 0, 171 | new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, 0x000000, 0.8, 2)); 172 | break; 173 | case Geometry.POLYGON: 174 | symbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, color, 0.8, 175 | new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, 0xFFFFFF, 0.8, 2)); 176 | break; 177 | case Geometry.POLYLINE: 178 | symbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, color, 0.8, 1); 179 | break; 180 | default: 181 | throw new Error('Geometry type ' + geometryType + ' is not supported.'); 182 | } 183 | 184 | return symbol; 185 | } 186 | 187 | 188 | private function randomNumber(low:Number=1, high:Number=100):Number 189 | { 190 | return this.roundDec(((Math.random() * (1+high-low)) + low)/100,3); 191 | } 192 | 193 | private function roundDec(numIn:Number, decimalPlaces:int):Number 194 | { 195 | var nExp:int = Math.pow(10,decimalPlaces) ; 196 | var nRetVal:Number = Math.round(numIn * nExp) / nExp 197 | return nRetVal; 198 | } 199 | 200 | private function getSeed():Number 201 | { 202 | // Generate a NEW seed 203 | var seed:Number; 204 | 205 | if(numSteps <= 0 || _seeds.length >= numSteps) 206 | { 207 | do 208 | { 209 | seed = this.randomNumber(); 210 | } while (_seeds.indexOf(seed) > -1); 211 | } 212 | else 213 | { 214 | seed = (_symbols.size > 0) ? (_symbols.size / numSteps) : 0.0; 215 | } 216 | trace(seed); 217 | 218 | // Cache the seed 219 | _seeds.push(seed); 220 | 221 | return seed; 222 | } 223 | } 224 | } -------------------------------------------------------------------------------- /VectorCache.Flex/Samples/src/com/esri/utils/Hashtable.as: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2010 ESRI 4 | // 5 | // All rights reserved under the copyright laws of the United States. 6 | // You may freely redistribute and use this software, with or 7 | // without modification, provided you include the original copyright 8 | // and use restrictions. See use restrictions in the file: 9 | // /License.txt 10 | // 11 | //////////////////////////////////////////////////////////////////////////////// 12 | package com.esri.utils 13 | { 14 | 15 | import flash.utils.Dictionary; 16 | 17 | public class Hashtable 18 | { 19 | private var keys:Dictionary; 20 | private var dups:Dictionary; 21 | private var initSize:int; 22 | private var maxSize:int; 23 | private var hashSize:int; 24 | private var item:Object = { key: null, obj: null, prev: null, next: null }; 25 | private var headItem:Object = { key: null, obj: null, prev: null, next: null }; 26 | private var tailItem:Object = { key: null, obj: null, prev: null, next: null }; 27 | 28 | /** 29 | * Initializes a new Hashtable instance. 30 | * 31 | * @param size The initial size of the Hashtable. 32 | */ 33 | public function Hashtable(size:int = 500) 34 | { 35 | initSize = maxSize = Math.max(10, size); 36 | 37 | keys = new Dictionary(true); 38 | dups = new Dictionary(true); 39 | hashSize = 0; 40 | 41 | var node:Object = { key: null, obj: null, prev: null, next: null }; 42 | headItem = tailItem = node; 43 | 44 | var k:int = initSize + 1; 45 | for (var i:int = 0; i < k; i++) 46 | { 47 | node.next = { key: null, obj: null, prev: null, next: null }; 48 | node = node.next; 49 | } 50 | tailItem = node; 51 | } 52 | 53 | /** 54 | * Add a key/data couple into the table. 55 | * 56 | * @param key The key. 57 | * @param obj The data associated with the key. 58 | */ 59 | public function add(key:*, obj:*):Boolean 60 | { 61 | if (key == null) 62 | { 63 | return false; 64 | } 65 | if (obj == null) 66 | { 67 | return false; 68 | } 69 | if (keys[key]) 70 | { 71 | return false; 72 | } 73 | 74 | if (hashSize++ == maxSize) 75 | { 76 | var k:int = (maxSize += initSize) + 1; 77 | for (var i:int = 0; i < k; i++) 78 | { 79 | tailItem.next = { key: null, obj: null, prev: null, next: null }; 80 | tailItem = tailItem.next; 81 | } 82 | } 83 | 84 | var pair:Object = { key: null, obj: null, prev: null, next: null }; 85 | headItem = headItem.next; 86 | pair.key = key; 87 | pair.obj = obj; 88 | 89 | pair.next = pair; 90 | if (pair) 91 | { 92 | pair.prev = pair; 93 | } 94 | pair = pair; 95 | 96 | keys[key] = pair; 97 | dups[obj] ? dups[obj]++ : dups[obj] = 1; 98 | 99 | return true; 100 | } 101 | 102 | /** 103 | * Finds the value that is associated with the given key. 104 | * 105 | * @param key The key mapping a value. 106 | * @return The data associated with the key or null if no matching 107 | * entry was found. 108 | */ 109 | public function find(key:*):* 110 | { 111 | var pair:Object = keys[key]; 112 | if (pair) 113 | { 114 | return pair.obj; 115 | } 116 | return null; 117 | } 118 | 119 | /** 120 | * Removes a value based on a given key. 121 | * 122 | * @param key The entry's key. 123 | * @return The data associated with the key or null if no matching 124 | * entry was found. 125 | */ 126 | public function remove(key:*):* 127 | { 128 | var pair:Object = keys[key]; 129 | if (pair) 130 | { 131 | var obj:* = pair.obj; 132 | 133 | delete keys[key]; 134 | 135 | if (pair.prev) 136 | { 137 | pair.prev.next = pair.next; 138 | } 139 | if (pair.next) 140 | { 141 | pair.next.prev = pair.prev; 142 | } 143 | if (pair == pair) 144 | { 145 | pair = pair.next; 146 | } 147 | 148 | pair.prev = null; 149 | pair.next = null; 150 | tailItem.next = pair; 151 | tailItem = pair; 152 | 153 | if (--dups[obj] <= 0) 154 | { 155 | delete dups[obj]; 156 | } 157 | 158 | if (--hashSize <= (maxSize - initSize)) 159 | { 160 | var k:int = (maxSize -= initSize) + 1; 161 | for (var i:int = 0; i < k; i++) 162 | { 163 | headItem = headItem.next; 164 | } 165 | } 166 | 167 | return obj; 168 | } 169 | return null; 170 | } 171 | 172 | /** 173 | * Checks if a mapping exists for the given key. 174 | * 175 | * @return True if key exists, otherwise false. 176 | */ 177 | public function containsKey(key:*):Boolean 178 | { 179 | return keys[key] != undefined; 180 | } 181 | 182 | /** 183 | * Writes all keys into an array. 184 | * 185 | * @return An array containing all keys. 186 | */ 187 | public function getKeySet():Array 188 | { 189 | var a:Array = new Array(hashSize), i:int; 190 | for each (var p:Object in keys) 191 | { 192 | a[i++] = p.key; 193 | } 194 | return a; 195 | } 196 | 197 | /** 198 | * @inheritDoc 199 | */ 200 | public function contains(obj:*):Boolean 201 | { 202 | return dups[obj] > 0; 203 | } 204 | 205 | /** 206 | * @inheritDoc 207 | */ 208 | public function clear():void 209 | { 210 | keys = new Dictionary(true); 211 | dups = new Dictionary(true); 212 | 213 | var t:Object; 214 | var n:Object = item; 215 | while (n) 216 | { 217 | t = n.next; 218 | 219 | n.next = n.prev = null; 220 | n.key = null; 221 | n.obj = null; 222 | tailItem.next = n; 223 | tailItem = tailItem.next; 224 | 225 | n = t; 226 | } 227 | 228 | item = null; 229 | hashSize = 0; 230 | } 231 | 232 | 233 | /** 234 | * @inheritDoc 235 | */ 236 | public function get size():int 237 | { 238 | return hashSize; 239 | } 240 | 241 | /** 242 | * @inheritDoc 243 | */ 244 | public function isEmpty():Boolean 245 | { 246 | return hashSize == 0; 247 | } 248 | 249 | /** 250 | * @inheritDoc 251 | */ 252 | public function toArray():Array 253 | { 254 | var a:Array = new Array(hashSize), i:int; 255 | for each (var p:Object in keys) 256 | { 257 | a[i++] = p.obj; 258 | } 259 | return a; 260 | } 261 | 262 | /** 263 | * Prints out a string representing the current object. 264 | * 265 | * @return A string representing the current object. 266 | */ 267 | public function toString():String 268 | { 269 | return "[Hashtable, size=" + size + "]"; 270 | } 271 | } 272 | 273 | } 274 | -------------------------------------------------------------------------------- /VectorCache/ArcStache/ComLogUtil.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.IO; 6 | 7 | namespace ArcStache 8 | { 9 | /// 10 | /// Summary description for LogUtil 11 | /// 12 | /// 13 | /// Default location for log file is in the "Logs" folder located in the directory the calling DLL exists in. 14 | /// 15 | public class ComLogUtil 16 | { 17 | private enum LogLevel 18 | { 19 | Debug, 20 | Error, 21 | Info, 22 | Warn 23 | } 24 | 25 | private const string _separator = " "; 26 | private string _directoryPath = ""; 27 | 28 | #region Constructor 29 | 30 | /// 31 | /// Initializes a new instance of the class. Log file will be created in a "Logs" folder located alongside the running DLL. 32 | /// 33 | public ComLogUtil() 34 | { 35 | // Create directory if it doesn't exist 36 | _directoryPath = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(this.GetType().Assembly.Location), "Logs"); 37 | if (!Directory.Exists(_directoryPath)) 38 | { 39 | Directory.CreateDirectory(_directoryPath); 40 | } 41 | 42 | // Create a default filename 43 | this.FileName = "_log.txt"; 44 | } 45 | 46 | #endregion 47 | 48 | #region Properties 49 | 50 | /// 51 | /// Gets or sets the name of the log file. 52 | /// 53 | /// The name of the log file. 54 | public string FileName { get; set; } 55 | //{ get; set { 56 | // if (!string.IsNullOrEmpty(value) && !value.ToLower().EndsWith(".txt")) 57 | // { 58 | // value = value + ".txt"; 59 | // }; 60 | //} 61 | //} 62 | 63 | /// 64 | /// Gets the file path. 65 | /// 66 | /// The file path. 67 | public string FilePath 68 | { 69 | get 70 | { 71 | return System.IO.Path.Combine(_directoryPath, this.FileName); 72 | } 73 | } 74 | 75 | #endregion 76 | 77 | #region Private Methods 78 | 79 | /// 80 | /// Logs the specified message by creating new log file or appending message. 81 | /// 82 | /// The message to be logged. 83 | private void Log(LogLevel level, string message) 84 | { 85 | // Format the log message 86 | // Wrap error messages in empty lines for easy viewing in log file 87 | StringBuilder formattedMsg = new StringBuilder(); 88 | if (level == LogLevel.Error) { formattedMsg.AppendLine(); } 89 | formattedMsg.Append(string.Format("{0}{1}{2}{3}{4}", DateTime.Now.ToString(), _separator, level.ToString(), _separator, message)); 90 | if (level == LogLevel.Error) { formattedMsg.AppendLine(); } 91 | 92 | // Create or append message to log file 93 | if (!File.Exists(this.FilePath)) 94 | { 95 | File.WriteAllText(this.FilePath, formattedMsg.ToString() + Environment.NewLine); 96 | } 97 | else 98 | { 99 | using (System.IO.StreamWriter file = new System.IO.StreamWriter(this.FilePath, true)) 100 | { 101 | file.WriteLine(formattedMsg.ToString()); 102 | } 103 | } 104 | } 105 | 106 | #endregion 107 | 108 | #region Public Methods 109 | 110 | /// 111 | /// Logs the info. 112 | /// 113 | /// Name of the source class. 114 | /// Name of the public method. 115 | /// The message. 116 | public void LogDebug(string className, string publicMethodName, string message) 117 | { 118 | this.Log(LogLevel.Debug, string.Format("{0}::{1}{2}{3}", className, publicMethodName, _separator, message)); 119 | } 120 | 121 | /// 122 | /// Logs the info. 123 | /// 124 | /// Name of the source class. 125 | /// Name of the public method. 126 | /// The message. 127 | public void LogInfo(string className, string publicMethodName, string message) 128 | { 129 | this.Log(LogLevel.Info, string.Format("{0}::{1}{2}{3}", className, publicMethodName, _separator, message)); 130 | } 131 | 132 | /// 133 | /// Logs the error. 134 | /// 135 | /// Name of the source class. 136 | /// Name of the public method. 137 | /// The method parameters. 138 | /// The exception. 139 | public void LogError(string className, string publicMethodName, string parameters, Exception ex) 140 | { 141 | this.Log(LogLevel.Error, string.Format("{0}::{1}{2}params: {3}{4}Exception: {5}", className, publicMethodName, Environment.NewLine, parameters, Environment.NewLine, ex.ToString())); 142 | } 143 | 144 | /// 145 | /// Logs the error. 146 | /// 147 | /// Name of the source class. 148 | /// Name of the public method. 149 | /// The method parameters. 150 | /// The exception. 151 | public void LogError(string className, string publicMethodName, string parameters, string message, Exception ex) 152 | { 153 | this.Log(LogLevel.Error, string.Format("{0}::{1}{2}message: {3}{4}params: {5}{6}Exception: {7}", className, publicMethodName, Environment.NewLine, message, Environment.NewLine, parameters, Environment.NewLine, ex.ToString())); 154 | } 155 | 156 | 157 | /// 158 | /// Logs the warning. 159 | /// 160 | /// Name of the source class. 161 | /// Name of the public method. 162 | /// The message. 163 | public void LogWarning(string className, string publicMethodName, string message) 164 | { 165 | this.Log(LogLevel.Warn, string.Format("{0}::{1}{2}{3}", className, publicMethodName, _separator, message)); 166 | } 167 | 168 | /// 169 | /// Logs the parameters. 170 | /// 171 | /// Name of the class. 172 | /// Name of the public method. 173 | /// The parameters. 174 | public void LogParameters(string className, string publicMethodName, string parameters) 175 | { 176 | this.Log(LogLevel.Debug, string.Format("{0}::{1}{2}params: {3}", className, publicMethodName, _separator, parameters)); 177 | } 178 | 179 | #endregion 180 | 181 | } 182 | } 183 | 184 | --------------------------------------------------------------------------------