Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
INSERT INTO dbo.[COUNTRY]
([COUNTRY]
,[GEOM])
VALUES
('Canada',geometry::STGeomFromText('MULTIPOLYGON (((-134.49554399999994 68.75221300000004, -134.48803699999991 68.736649, -134.48803699999991 68.7310940000001, -134.48306299999996 68.720535000000041, -134.47387700000002 68.711379999999963, -134.46472199999994 68.707489000000066, -134.44638099999997 68.700271999999984, -134.40112299999993 68.687759000000085, -134.373871 68.682480000000112, -134.33999599999999 68.67886400000009, -134.30804399999994 68.678040000000124, -134.282776 68.681366000000139, -134.24636799999996 68.687484999999981, -134.23071299999998 68.6928410000001, -134.22692899999998 68.694138000000123, -134.22332800000004 68.699706999999933, -134.26058999999987 68.733535999999958, -134.26251200000002 68.736374000000126, -134.28750599999995 68.753601, -134.30835000000002 68.766097999999943, -134.32638499999996 68.773605000000089, -134.423065 68.831664999999987, -134.54168700000002 68.919708000000071, -134.5580
@jumpinjackie
jumpinjackie / gist:3622433
Created September 4, 2012 15:30
Setting up MgCoordinateSystem factory
using OSGeo.MapGuide;
...
MgCoordinateSystemFactory csFactory = new MgCoordinateSystemFactory();
MgCoordinateSystemCatalog csCatalog = csFactory.GetCatalog();
csCatalog.SetDictionaryDir("C:\\Path\\To\\My\\Dictionaries");
//Your Coordinate System API classes can now be used
@jumpinjackie
jumpinjackie / gist:6334973
Created August 25, 2013 16:57
Minimal CREATERUNTIMEMAP response
<?xml version="1.0" encoding="UTF-8"?>
<RuntimeMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="RuntimeMap-2.6.0.xsd">
<SiteVersion>2.6.0.0</SiteVersion>
<SessionId>82a71582-befa-11e2-8000-080027004461_en_MTI3LjAuMC4x0B060B050B04</SessionId>
<Name>Sheboygan</Name>
<MapDefinition>Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition</MapDefinition>
<BackgroundColor>ffcdbd9c</BackgroundColor>
<DisplayDpi>96</DisplayDpi>
<CoordinateSystem>
<Wkt>GEOGCS["WGS84 Lat/Long's, Degrees, -180 ==&gt; +180",DATUM["D_WGS_1984",SPHEROID["World_Geodetic_System_of_1984",6378137,298.257222932867]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]</Wkt>
@jumpinjackie
jumpinjackie / gist:6334979
Created August 25, 2013 16:58
Minimal CREATERUNTIMEMAP response (tiled map)
<?xml version="1.0" encoding="UTF-8"?>
<RuntimeMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="RuntimeMap-2.6.0.xsd">
<SiteVersion>2.6.0.0</SiteVersion>
<SessionId>ccfb2298-c45b-11e2-8000-080027004461_en_MTI3LjAuMC4x0B060B050B04</SessionId>
<Name>Sheboygan</Name>
<MapDefinition>Library://Samples/Sheboygan/MapsTiled/Sheboygan.MapDefinition</MapDefinition>
<BackgroundColor>FFCDBD9C</BackgroundColor>
<DisplayDpi>96</DisplayDpi>
<CoordinateSystem>
<Wkt>GEOGCS["WGS84 Lat/Long's, Degrees, -180 ==&gt; +180",DATUM["D_WGS_1984",SPHEROID["World_Geodetic_System_of_1984",6378137,298.257222932867]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]</Wkt>
@jumpinjackie
jumpinjackie / gist:6334986
Created August 25, 2013 16:59
CREATERUNTIMEMAP response with layer/group structure
<?xml version="1.0" encoding="UTF-8"?>
<RuntimeMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="RuntimeMap-2.6.0.xsd">
<SiteVersion>2.6.0.0</SiteVersion>
<SessionId>7fdaa490-befa-11e2-8000-080027004461_en_MTI3LjAuMC4x0B060B050B04</SessionId>
<Name>Sheboygan</Name>
<MapDefinition>Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition</MapDefinition>
<BackgroundColor>ffcdbd9c</BackgroundColor>
<DisplayDpi>96</DisplayDpi>
<CoordinateSystem>
<Wkt>GEOGCS["WGS84 Lat/Long's, Degrees, -180 ==&gt; +180",DATUM["D_WGS_1984",SPHEROID["World_Geodetic_System_of_1984",6378137,298.257222932867]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]</Wkt>
@jumpinjackie
jumpinjackie / gist:6334995
Created August 25, 2013 17:01
CREATERUNTIMEMAP with layer/group structure and inline icons
<?xml version="1.0" encoding="UTF-8"?>
<RuntimeMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="RuntimeMap-2.6.0.xsd">
<SiteVersion>2.6.0.0</SiteVersion>
<SessionId>cc47aa6c-befa-11e2-8000-080027004461_en_MTI3LjAuMC4x0B060B050B04</SessionId>
<Name>Sheboygan</Name>
<MapDefinition>Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition</MapDefinition>
<BackgroundColor>ffcdbd9c</BackgroundColor>
<DisplayDpi>96</DisplayDpi>
<IconMimeType>image/png</IconMimeType>
<CoordinateSystem>
@jumpinjackie
jumpinjackie / gist:6334997
Created August 25, 2013 17:01
CREATERUNTIMEMAP with all features (layer/group structure, icons, feature source information)
<?xml version="1.0" encoding="UTF-8"?>
<RuntimeMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="RuntimeMap-2.6.0.xsd">
<SiteVersion>2.6.0.0</SiteVersion>
<SessionId>af95896c-bef9-11e2-8000-080027004461_en_MTI3LjAuMC4x0B060B050B04</SessionId>
<Name>Sheboygan</Name>
<MapDefinition>Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition</MapDefinition>
<BackgroundColor>ffcdbd9c</BackgroundColor>
<DisplayDpi>96</DisplayDpi>
<IconMimeType>image/png</IconMimeType>
<CoordinateSystem>
<!DOCTYPE html>
<html>
<head>
<title>Chrome dun goof'd!</title>
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.js"></script>
<script type="text/javascript" src="//underscorejs.org/underscore.js"></script>
<script type="text/javascript" src="//backbonejs.org/backbone.js"></script>
<script type="text/javascript">
var AppRouter = Backbone.Router.extend({
@jumpinjackie
jumpinjackie / iconv_test
Created July 30, 2014 02:49
iconv_open test application
#include <iconv.h>
#include <stdio.h>
int main(int argc, char** argv)
{
iconv_t r = iconv_open("UTF-8", "WCHAR_T");
if ((iconv_t)-1 != r)
{
iconv_close(r);
printf("iconv_open() worked!\n");
@jumpinjackie
jumpinjackie / fixsqlite
Created June 18, 2015 11:20
Fix SQLite data stores with no FDO spatial context
-- Put in a default spatial context entry
insert into spatial_ref_sys(srid, sr_name)
values (1, 'Default')
-- Make all geometry columns point to it
update geometry_columns
set srid = 1