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 "Nuclear Power Map" | |
EXTENT -1622777.025136114 5036320.52109153 2617519.4114628565 8597992.10957372 | |
PROJECTION | |
"init=epsg:3857" | |
END | |
SYMBOL | |
NAME "nuclear" | |
TYPE PIXMAP | |
IMAGE "nuclear-power-plant.png" |
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
-- Convert "3D Multi Line String" geoms to "Geometry: 3D Measured Multi Line String" (add measures) | |
-- in a spatialite db using ogr2ogr | |
ogr2ogr -update -f "SQLite" db.sqlite db.sqlite -nln "OutputGeomsZM" -sql "SELECT ObjectId, geom FROM SourceTable" -overwrite -nlt MULTILINESTRINGZM | |
ogrinfo db.sqlite OutputGeomsZM -so | |
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 re | |
import os | |
import glob | |
# https://stackoverflow.com/questions/53082965/how-can-i-match-a-restructuredtext-code-block-with-regex-and-python | |
def update_index_directive(directive): | |
""" |
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
root@php-mapscript:/build/mapserver/build# sudo cmake .. -DCMAKE_BUILD_TYPE=Release \ | |
> -DWITH_CLIENT_WFS=ON \ | |
> -DWITH_CLIENT_WMS=ON \ | |
> -DWITH_CURL=ON \ | |
> -DWITH_GDAL=ON \ | |
> -DWITH_GIF=ON \ | |
> -DWITH_ICONV=ON \ | |
> -DWITH_KML=ON \ | |
> -DWITH_LIBXML2=ON \ | |
> -DWITH_OGR=ON \ |
This file has been truncated, but you can view the full file.
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
/* ---------------------------------------------------------------------------- | |
* This file was automatically generated by SWIG (http://www.swig.org). | |
* Version 4.0.0 | |
* | |
* This file is not intended to be easily readable and contains a number of | |
* coding conventions designed to improve portability and efficiency. Do not make | |
* changes to this file unless you know what you are doing--modify the SWIG | |
* interface file instead. | |
* ----------------------------------------------------------------------------- */ |
This file has been truncated, but you can view the full file.
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
%includefile "/usr/share/swig/4.0.0/swig.swg" %beginfile | |
/* ----------------------------------------------------------------------------- | |
* swig.swg | |
* | |
* Common macro definitions for various SWIG directives. This file is always | |
* included at the top of each input file. | |
* ----------------------------------------------------------------------------- */ | |
/* ----------------------------------------------------------------------------- | |
* User Directives |
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
""" | |
To run, edit layer name, host, application path and bounding boxes. | |
Then: | |
locust -f ows_user.py --host=http://ubuntu-mapserver | |
http://localhost:8089 | |
""" | |
from locust import HttpLocust, TaskSet, task |
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 | |
NewerOlder