Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
arnoudbuzing committed Oct 26, 2018
1 parent 9f1bce9 commit ec41f3c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Prototypes/PacletInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Description -> "A paclet for prototype functions",
Creator -> "Arnoud Buzing",
Publisher -> "Wolfram Research",
Version -> "0.4.6",
Version -> "0.4.7",
MathematicaVersion -> "11.2+",
Loading -> "Startup",
Thumbnail -> "icons/icon.png",
Expand Down Expand Up @@ -71,7 +71,7 @@
"Prototypes`$LocalAppDataDirectory",
"Prototypes`$LocalResourceObjects",
"Prototypes`$RoamingAppDataDirectory",
"Prototypes`$UUIDStringPattern",
"Prototypes`$UUIDStringPattern","Prototypes`GeoContourMap",
"Prototypes`RandomRomanNumeral", "Prototypes`Deconstruct", "Prototypes`RandomDelete",
"Prototypes`RandomPosition", "Prototypes`What3Words", "Prototypes`$HashTypes",
"Prototypes`PrimeCount", "Prototypes`PrimeSum", "Prototypes`$EnglishWords", "Prototypes`OpenSky"}
Expand Down
23 changes: 22 additions & 1 deletion Prototypes/Source/GeoGraphics.wl
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,25 @@ GeoService = <|
{"ArcGIS","UnitedStatesTopographical"} -> "https://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/`1`/`3`/`2`"
|>;

GeoService["Properties"] = Keys[GeoService];
GeoService["Properties"] = Keys[GeoService];



GeoContourMap[input_, contours_List] := Module[{geobounds, reliefmap, projection, geogridrange,
geoelevationdata, contour},
geobounds = GeoBounds[input];
reliefmap =
GeoGraphics[input, GeoBackground -> "ReliefMap", ImageSize -> 800,
Frame -> True];
projection = GeoProjection /. Options[reliefmap, GeoProjection];
geogridrange = GeoGridRange /. Options[reliefmap, GeoGridRange];
geoelevationdata =
GeoElevationData[GeoProjection -> projection,
GeoGridRange -> geogridrange, UnitSystem -> "Imperial"];
contour =
ListContourPlot[Reverse[geoelevationdata["Magnitudes"]],
Contours -> contours, PlotLegends -> Automatic, ImageSize -> 800,
ContourShading -> None, DataRange -> geogridrange,
AspectRatio -> Automatic, Frame -> True, PlotRangePadding -> None];
Show[First[reliefmap], contour]
]
2 changes: 1 addition & 1 deletion Prototypes/Source/Script.wl
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ $ScriptExecutionEnvironment := Module[{checks},
{False,False,True,False}, "Running in wolframscript.exe",
{False,False,False,False}, "Running directly from .wls"
]
]
]
2 changes: 2 additions & 0 deletions Prototypes/Source/Usage.wl
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ TranslationCell::usage = "TranslationCell[text,lang] prints a \"Text\" cell cont
GeoService::usage = "GeoService[name] provides GeoServer 'name' for geographical functions. Use GeoService[\"Properties\"] for a list. Use with GeoServer option.";
LayeredGeoGraphics::usage = "LayeredGeoGraphics[primitives,layers] creates a layered GeoGraphics map for the specified GeoService layers";
FormatDetect::usage = "FormatDetect[format,data] checks if 'data' (String/List/ByteArray) matches 'format' (PNG/JPG/GIF)";
GeoContourMap::usage = "GeoContourMap[location,contours] draws a contour map over a relief map for 'location' using a list of 'contours'";

(* cloud *)
CreateNotebookRenderAPI::usage = "CreateNotebookRenderAPI[] creates the cloud api functions used by RenderOnlineNotebook";
RenderOnlineNotebook::usage = "RenderOnlineNotebook[url] reads 'url' and opens a private editable copy";
Expand Down

0 comments on commit ec41f3c

Please sign in to comment.