Created
July 15, 2025 13:45
-
-
Save aspose-com-gists/c3b85095c638b3bdfa856052ebddaa54 to your computer and use it in GitHub Desktop.
GeoJSON to BMP
This file contains hidden or 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
// Set the path to the documents directory. | |
string dataDir = "files"; | |
// Create an instance of the Map class. | |
using (var map = new Aspose.Gis.Rendering.Map(600, 300)) | |
{ | |
// Use the specified SRS. | |
map.SpatialReferenceSystem = Aspose.Gis.SpatialReferencing.SpatialReferenceSystem.Wgs84; | |
// Use the specified style to draw lines. | |
var symbolizer = new Aspose.Gis.Rendering.Symbolizers.SimpleLine() { Width = Aspose.Gis.Rendering.Measurement.Pixels(1) }; | |
// Open a layer and add to the map. | |
map.Add(Aspose.Gis.VectorLayer.Open(dataDir + "sample.geojson", Aspose.Gis.Drivers.GeoJson), symbolizer); | |
// Invoke the Render method to process the map to BMP format. | |
map.Render(dataDir + "sample-output.bmp", Aspose.Gis.Rendering.Renderers.Bmp); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment