This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE child SET ParentId = parent.FID | |
FROM ChildTableName child | |
,ParentTableName parent | |
WHERE ChildTableName.GEOM.STWithin(parent.GEOM) = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--sample assumes two tables - reference.Townland and bioenergy.soils | |
--create a sample area by buffering a point | |
DECLARE @g AS geometry; | |
SET @g = geometry::STGeomFromText('POINT (200000 200000)', 29902).STBuffer(1000); | |
--create a temporary table variable to store results | |
DECLARE @results TABLE (GEOM Geometry); | |
--select all the polygons in our sample area and add them to the same table | |
INSERT INTO @results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import shlex, os, glob | |
#ensure ImageMagick and Ghostscript are installed | |
#tested on Python 2.7 / Windows XP | |
#this folder contains the convert.exe | |
image_magick_path = "C:\\Program Files\\ImageMagick-6.6.7-Q16\\" | |
os.chdir(image_magick_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--example use of the CreateLinearReferenceFeature function | |
--see http://geographika.co.uk/linear-referencing-in-sql-server-2008 for details | |
--can be run directly in Management Studio once the Register.sql | |
--script has added the SQLSpatialTools.dll to the database | |
DECLARE @original_line AS geometry | |
--create a line feature | |
SET @original_line = geometry::STGeomFromText('LINESTRING (313401 232075, | |
313401.6885 232075.662, | |
313419.0265 232036.7775, 313434.913 232000.2635, 313456.0535 231952.438, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def AppendPaths(paths): | |
"""Append all the paths with DLLs to be used by the script to the Python Path""" | |
import sys | |
for p in paths: | |
sys.path.append(p) | |
def AddReferences(refs): | |
"""Add references to the required DLLs""" | |
import clr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<wfs:Query typeName="Test" srsName="EPSG:900913"> | |
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> | |
<ogc:BBOX> | |
<ogc:PropertyName>the_geom</ogc:PropertyName> | |
<gml:Envelope xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:900913"> | |
<gml:lowerCorner>-773942.72965167 6944065.5166421</gml:lowerCorner> | |
<gml:upperCorner>-768936.10429989 6946745.5899459</gml:upperCorner> | |
</gml:Envelope> | |
</ogc:BBOX> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAP | |
NAME "MyMap" | |
WEB | |
METADATA | |
"ows_enable_request" "*" | |
"wfs_srs" "EPSG:29902 EPSG:900913" #this setting has #1 priority | |
"ows_srs" "EPSG:29902 EPSG:900913" #this setting is used if no wfs_srs is present | |
END | |
END | |
# If your map does not have a projectionobject then WMS layers will return errors such as: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copyright (C) 2012 S. Girvin | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |
and associated documentation files (the "Software"), to deal in the Software without restriction, | |
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |
subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nose.plugins import Plugin | |
class HtmlOutput(Plugin): | |
""" | |
This is the plugin class | |
A simple HTMLPlugin can be seen at https://github.com/nose-devs/nose/blob/master/examples/html_plugin/htmlplug.py | |
However this does not use templates | |
""" | |
pass | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2008-2015 The Open Source Geospatial Foundation | |
* | |
* Published under the BSD license. | |
* See https://github.com/geoext/geoext2/blob/master/license.txt for the full | |
* text of the license. | |
*/ | |
/* | |
* @requires GeoExt/Version.js |
OlderNewer