Map Drawer — Draw Shapes, Polygons & Paths
Draw custom lines, polygons, and property boundaries directly onto an interactive map. Calculates enclosed surface area in acres, square miles, and square kilometers, with one-click GeoJSON export.
79.02 KM² (19,527.5 ACRES)
Perimeter: 40.54 km | Click to add more vertices or download GeoJSON
How to use the map drawer
- 1Pick a drawing tool
Choose a line or a polygon.
- 2Click to draw
Click the map to add points; undo the last point or clear the drawing at any time.
- 3Measure and export
Read the length or area in miles, km, acres or square miles and export the shape as GeoJSON.
Points, lines and shapes: what you can draw on a map
Map drawing in modern Geographic Information Systems (GIS) is the computational process of vector digitization—translating real-world geographic features into discrete mathematical primitives:
- Points: A single coordinate pair representing discrete assets (trees, delivery stops, survey monuments).
- Polylines (LineStrings): An ordered array of vertices connected by straight line segments, representing linear networks (highways, rivers, utility trenches, hiking tracks).
- Polygons: A closed sequence of four or more vertices where the first and last coordinates are identical, defining contiguous geographic regions (property lots, zoning districts, lakes).
Under the international RFC 7946 GeoJSON specification, coordinates are stored in the mathematical order [Longitude, Latitude, Elevation] (X, Y, Z order), matching standard Cartesian planes.
Rules for drawing valid shapes
Creating professional GIS data requires adhering to strict mathematical topological integrity:
The Right-Hand Winding Rule
RFC 7946 mandates that polygon exterior boundaries must be wound in a Counter-Clockwise (CCW) direction. If you walk along the boundary in vertex order, the interior of the polygon always sits on your left. Any interior “holes” (such as an island within a lake) must be wound in reverse: Clockwise (CW).
No Self-Intersection (Bowties)
A valid polygon cannot self-intersect (forming a figure-8 or “bowtie” shape). In spatial databases like PostGIS, self-intersecting geometries fail the ST_IsValid() test, breaking area calculations and point-in-polygon spatial queries.
How line simplification works
When users draw freehand curves or import raw GPS tracks containing tens of thousands of GPS breadcrumbs, the raw GeoJSON payload can balloon to dozens of megabytes, causing browser rendering lag.
To optimize geometry without sacrificing visual fidelity, spatial engines apply the Ramer-Douglas-Peucker (RDP) algorithm:
The algorithm draws a baseline chord connecting the line's starting point and ending point. It calculates the perpendicular distance from every intermediate vertex to that chord. If the maximum perpendicular distance is less than a designated tolerance threshold ε, all intermediate vertices are discarded. If it exceeds ε, the line is split at that vertex and the algorithm recurses on both halves.
This recursive process routinely eliminates 70% to 90% of redundant vertices while maintaining millimeter-accurate visual curvature.
Example: deciding which points to drop
The perpendicular distance d from candidate vertex P(x₀, y₀) to the baseline vector connecting endpoints A(x₁, y₁) and B(x₂, y₂) is calculated via planar geometry:
d = \frac{|(y_2 - y_1)x_0 - (x_2 - x_1)y_0 + x_2 y_1 - y_2 x_1|}{\sqrt{(y_2 - y_1)^2 + (x_2 - x_1)^2}}, \quad \text{Keep vertex if } d > \epsilon- Numerator = |(0 - 0)*50 - (100 - 0)*1.4 + 100*0 - 0*0| = |0 - 140 + 0| = 140.0
- Denominator = √((0 - 0)² + (100 - 0)²) = √(10,000) = 100.0 meters
- Perpendicular distance d = 140.0 / 100.0 = 1.40 meters
- Evaluation: d (1.40 m) < ε (2.0 m) ⟹ Vertex P is within tolerance and is pruned
Because the curve deviated by only 1.4 meters over a 100-meter span, dropping this vertex preserves the shape of the road while shrinking the GeoJSON file size by 33%.
GeoJSON geometry types reference
Reference this authoritative directory detailing vector geometry dimensions, minimum vertex counts, and winding rules:
Authoritative Vector Geometry Hierarchy and RFC 7946 Specifications
Standard specifications governing GeoJSON, TopoJSON, and modern web spatial rendering.
| Geometry Primitive | Spatial Dimension | Minimum Vertices | Winding & Ordering Rule | Typical Practical Application |
|---|---|---|---|---|
| Point | 0-Dimensional | 1 coordinate pair [lon, lat] | Not applicable | Location markers, landmarks, fire hydrants, weather stations |
| LineString | 1-Dimensional | 2 distinct coordinate pairs | Directional sequence (Start to End node) | Road centerlines, utility pipelines, hiking trails, flight corridors |
| Polygon (Simple) | 2-Dimensional | 4 coordinate pairs (first = last) | Counter-Clockwise (CCW) exterior ring | Property parcels, municipal boundaries, building footprints, lakes |
| Polygon (With Holes) | 2-Dimensional | 8+ coordinate pairs (2+ rings) | Exterior CCW, Interior hole rings Clockwise (CW) | Enclaves, island lakes, donut-shaped administrative precincts |
| MultiPolygon | 2-Dimensional | Multiple disconnected polygon rings | Each individual polygon adheres to CCW rule | Archipelagic nations (Hawaii, Philippines, Indonesia), disjoint parcels |
Limitations of drawing on a web map
When drafting custom vector geometries on web maps, cartographers must manage several common computational hurdles:
- Antimeridian Cutting (-180° / +180°): When drawing a polygon spanning the Pacific Ocean across the 180th meridian (such as Fiji or Alaska's Aleutian Islands), naive map renderers draw horizontal streaks across the entire world map. The geometry must be sliced into a MultiPolygon split at -180° and +180°.
- Sliver Polygons & Gaps: Manually tracing adjacent boundaries (such as neighboring counties or property lots) without snapping leads to micro-gaps or microscopic overlaps known as sliver polygons, creating erroneous boundary conflicts.
- DOM Rendering Overload: Rendering over 10,000 individual SVG polygon nodes directly in the browser DOM causes frame-rate stutter; large datasets should be rendered via HTML5 Canvas or WebGL shaders (MapLibre / Mapbox GL).
- Drawn polygons calculated in Web Mercator screen pixels will report grossly inflated surface areas in northern latitudes; Open Map Lab evaluates true polygon area using geodesic spherical integration.
- Always export drawings as standard GeoJSON (RFC 7946) to guarantee interoperability across QGIS, ArcGIS, Mapbox, and AutoCAD.
Related Vector GIS & Measurement Tools
Export drawings, measure areas, or inspect GIS shapefile formats:
Quick facts about the map drawer
| Fact | Value | Notes |
|---|---|---|
| Drawing Features | Polygons & Polylines | Click to place sequential vertices |
| Area Calculations | Acres, Hectares, Sq Miles, Km² | Spherical excess geodesic math |
| Export Options | Standard GeoJSON Export | Compatible with QGIS, ArcGIS, MapLibre |
Edge cases and exceptions
Self-Intersecting Polygons
Polygons that cross over themselves (figure-eights) can cause negative or distorted area calculations. The tool displays warnings for complex self-intersections.
The map drawer: worked examples
Farm Acreage Measurement
Scenario: Drawing around 4 corner fence posts of an agricultural pasture.
Outcome: Computes total enclosed land area of 84.6 acres and total perimeter fence length of 1.48 miles.
Frequently asked questions about the map drawer
How do I draw on the map?
Click anywhere on the map canvas to place vertices. Once you place 3 or more points, the polygon closes and calculates area automatically.
Can I export my drawn shape?
Yes. Click "Export GeoJSON" to download the coordinate geometry as an industry-standard GeoJSON file.
What can I draw?
Lines, polygons and points on an interactive map. The tool measures length and area as you draw.
How do I export what I draw?
Download your shapes as GeoJSON, which opens in GIS software, Google Earth converters and web map libraries.
How do I delete or edit a point?
Use the undo and clear controls to remove the last point or start again.
Is my drawing saved on a server?
No. Shapes stay in your browser unless you export or copy them.
What units are used for area?
Acres, square miles, square kilometers, and other common units.
Can I draw a circle?
Use the map radius tool for circles. This tool draws polygons made of straight segments.
Why must a polygon not cross itself?
A self-intersecting polygon has an ambiguous interior, so area calculations are unreliable.
How many points can I add?
There is no fixed limit, but very large shapes may slow your browser.
Keep exploring
What to do with this result
- Map Area Calculator — Measure Land Area & AcreageUse this to measure area on a map.
- GeoJSON Viewer & Map InspectorUse this to view a GeoJSON file.
- Pin Drop Map — Drop Pins & Save LocationsUse this to drop pins on a map.
- Embed Map Code GeneratorUse this to embed a map on your website.
- Map With Legend MakerUse this to make a map with a legend (color-coded key).