Geofence Event Simulator

Geofence Event Simulator

Compute and replay when timestamped locations enter or exit GeoJSON zones.

1. Zones and route

Use Polygon/MultiPolygon GeoJSON for zones and a {time,lon,lat} array for the route. Coordinates are longitude, latitude; times need a timezone offset or Z.

Tolerance only classifies samples near an edge. Crossings stay on the actual ring; touches with unchanged state do not create events.

Comments & questions

Geofence Event Simulator

Find every zone-boundary crossing between timestamped locations and estimate its time by linear interpolation. The simulator checks outer rings and holes, so it can detect an entry and exit even when both recorded samples are outside. Its map is a local, tile-free planar preview.

Key features

  • RFC 7946 GeoJSON Polygon and MultiPolygon zones, including interior holes
  • Every straight-segment boundary crossing between strictly increasing timestamped samples
  • Selectable inside/outside treatment of the boundary and a meter-based sample proximity tolerance
  • Tangencies and duplicate vertex hits merged to avoid false entry/exit events
  • Route replay with per-zone state, crossing time, coordinates and segment fraction
  • Browser-local JSON, CSV and SVG export with bounded, validated input

How to use

  1. Paste GeoJSON zones and an array of {time,lon,lat} samples, or choose local JSON files. The example crosses an interior hole.
  2. Choose whether exact boundary points count as inside or outside, and set a 0–100 m sample-boundary tolerance.
  3. Run the simulation to list each segment crossing and its interpolated UTC time.
  4. Use Play or the time slider to move the location marker; select a log entry to jump to its crossing.
  5. Download the event log as JSON or CSV, or save the current map frame as SVG.

Use cases

  • Test location-trigger rules before deploying a geofence alert
  • Find two crossings hidden between sparse GPS samples
  • Verify exit and re-entry when a route traverses a polygon hole
  • Compare policies for boundary samples, tangencies and duplicate timestamps

Frequently asked questions

How is a crossing time between samples computed?

The tool joins two recorded longitude–latitude positions with a planar straight segment, finds its intersection fraction with the zone ring, and linearly interpolates the UTC timestamps. It cannot recover the true route, varying speed or a geodesic trajectory.

How do boundary policy and tolerance differ?

The policy says whether a point or interval exactly on a boundary counts as inside or outside. The 0–100 m tolerance classifies samples near a boundary; it does not shift the polygon or the interpolated crossing coordinates.

What if there are no zones or timestamps are unordered?

An empty FeatureCollection yields zero zones and events. Timestamps must increase strictly; reversed, duplicate or malformed times produce an actionable error.

Does touching a vertex create an entry or exit?

No event is recorded if the inside state before and after the touch is unchanged. Duplicate hits at a shared vertex are merged, while travel along a boundary follows the chosen policy.

Can this handle continental routes or the antimeridian?

No. Combined longitude and latitude spans are each limited to 3 degrees, latitude to ±85 degrees, and antimeridian-crossing zones are rejected. The planar model is not a surveying or navigation decision engine.

Are coordinates uploaded?

No. Files and coordinates are processed in this browser tab, without external map tiles. Downloads are created locally only when requested.

Privacy

Zones and route samples remain in the current browser tab. There is no server upload or external map request.

References

Related Tools

GeoJSON Map EditorGeoJSON Topology AuditorCoordinate Reference LabWasm Module InspectorHreflang Matrix CheckerAST Query PlaygroundContainer Build GraphDependency Graph ExplorerSemver Range LabCron Schedule AuditorPatch Review WorkbenchSource Map ExplorerLocalization Catalog AuditorStructured Data ReviewerHTTP Archive AnalyzerWebhook Signature LabProtobuf Schema WorkbenchGraphQL Schema LabAvro Schema EvolutionLocal SQL WorkbenchSchema Form BuilderMesh Repair WorkbenchPipe Network LabRobot Arm Kinematics LabThermal Network LabBeam Response LabGear Train DesignerTolerance Stackup LabSensor Calibration FitPCB Stackup PlannerDigital Filter DesignerNetwork Reachability MapSun Shadow MapGPS Error SimulatorDigital Logic SimulatorAnalog Circuit LabMechanism Linkage LabAnalysis Mesh GeneratorOpenAPI Contract InspectorDatabase Migration PlannerDimensional Equation CheckerTruss Force LabBoolean Minimization LabControl Response LabQueueing Simulation LabSurvey Traverse LabRaster Classification LabChoropleth Design LabMap Print ComposerRaster Reprojection LabElevation Contour MakerTerrain Viewshed LabWatershed DelineatorMap Tile PackagerText File Encoding WorkbenchFilesystem Portability AuditorSBOM License ExplorerFile Signature Auditornpm Lockfile Conflict ResolverSource Secret AuditorOffline Web Package BuilderCertificate Chain InspectorTorrent Metainfo InspectorChunked File PackagerEncrypted File VaultDuplicate File FinderArchive WorkbenchDesign Token ManagerSpacing Token DesignerResponsive Type SystemPackaging Dieline DesignerSVG Icon Sprite PackerFlex Layout PlaygroundCSS Grid PlaygroundRegex Equivalence LabMarkdown Repository AuditorLog Template MinerResponsive Layout AuditorEmail Template PreviewInternal Link GraphState Machine TesterPetri Net SimulatorGit History VisualizerCurl Request WorkbenchBinary Protocol DesignerHex File EditorBinary Patch WorkbenchFile Signature WorkbenchAPI Mock SandboxSchema Column MapperEvent Log SessionizerER Diagram DesignerTime Series Gap AuditorStratified Data SplitterData Lineage DesignerDecision Tree LabData Anonymization WorkbenchData Expectation RunnerJSON Schema ValidatorBasket Pattern AnalyzerRobots Policy TesterSEO HTML AuditorAccessibility Structure AuditorSyndication Feed WorkbenchIndexNow Payload BuilderCrawl Log AnalyzerCSP Policy WorkbenchSearch Performance AnalyzerCSV Formula Risk AuditorCORS Response SimulatorCache Header LabCookie Policy InspectorWeb Vitals Trace LabSitemap Health AuditorBatch File RenamerFile Manifest VerifierFolder Space MapFolder Difference ReviewerRoute Order OptimizerPolygon Overlay LabCartographic Label PlacerSpatial Table JoinGPX Track AnalyzerTrack Privacy RedactorCSV Table JoinCSV Pivot WorkbenchScientific Data ProfilerTabular Cleaning WorkbenchRecord ReconciliationData Dictionary BuilderCanonical Graph AuditorRedirect Plan TesterHTTP response and ping reference testBrowser and System InformationJSON ↔ YAML ConverterXML ↔ JSON ConverterHTML FormatterJavaScript MinifierMock Data Generator.gitignore GeneratorLicense GeneratorUser-Agent ParserPassword Strength CheckerCode to ImageXML FormatterHTTP Status Code LookupMIME Type LookupJS & SQL String EscapeCSS Box Shadow GeneratorCSS Gradient GeneratorIndent ConverterNumber Base ConverterUnicode Escape ConverterUnicode InspectorJSON Structure DiffMarkdown Table GeneratorBase64 EncoderJSON FormatterURL EncoderSQL FormatterCron Expression GeneratorRegex TesterUUID GeneratorHash GeneratorTimestamp ConverterJWT DecoderHTML Entity ConverterMarkdown PreviewCSS MinifierMeta Tag GeneratorJSON ↔ CSVCase ConverterImage to Base64
Explore all Dev Tools tools →Image/Media →Text/Convert →Life/Fun →