7 votes

Geofencing using PostGIS

Your linestring has to end in the same point as it starts to create a polygon from it: select ST_MakePolygon(ST_GeomFromText('LINESTRING (118.868653 32.199966,118.873224 32.192503,118.876336 32.184894,...
BERA's user avatar
  • 71.3k
4 votes

Determining if Point is in Polygon using PostGIS?

The polygon is not defined properly, making it an empty geometry. You need to add an extra square bracket. The doc says that polygons are defined by an array of linear rings, to allow having holes. ...
JGH's user avatar
  • 41.6k
3 votes
Accepted

How to Select an SRID? And how is it different from the SRID passed into ST_Transform?

This part of your query: ST_SetSrid( ST_MakePoint({longitude},{latitude}) ,27700) makes a point in OSGB (EPSG:27700) coordinates so 51.5,-0.1 is somewhere off the Scilly Isles (Britain's very ...
Ian Turton's user avatar
  • 81.1k
2 votes
Accepted

How big does a circular geofence need to be for the curvature of the earth to matter?

whuber gave a wonderful answer that addresses the central folly of this idea. While he doesn't say this directly most people, like me, initially overlook two interrelated factors. Longitude converges ...
Erik's user avatar
  • 309
2 votes

List of the United States (US) state boundaries / borders as latitude/longitude pairs for geofence?

From your comments, it looks like you'd like to convert those shapefiles to CSV. As to why this data isn't readily available, it all depends on your application and what you want to do with the data, ...
Mintx's user avatar
  • 5,386
2 votes
Accepted

GeoPandas geofencing problem set up

The following code snippet is untested because I don't have data, but I think/hope it will get you started. Inline comments explain what is happening and why: import geopandas as gpd # Read your ...
Pieter's user avatar
  • 1,555
1 vote

Make a relationship based on points and fences

I don't think you can do this in the model implicitly, that is to say, without evaluating it when an object is created and updated, for example. What you might do is when you are doing something with ...
Alex Leith's user avatar
  • 13.4k
1 vote

What are the state border outlines called which treat every state as a single entity, including surrounding waters?

International law provides for a 12-mile territorial sovereignty extension on oceans, seas, and lakes. Since Long Island Sound is less than 24 miles across, the entire body is US territory, and the ...
Vince's user avatar
  • 20k
1 vote

What are the state border outlines called which treat every state as a single entity, including surrounding waters?

I think they represent some borders. From Google Maps Help: State and province borders, like the boundary of New Jersey or Alberta, are shown as thin, light-gray dotted lines inside a country. ...
mgri's user avatar
  • 16.1k
1 vote

List of the United States (US) state boundaries / borders as latitude/longitude pairs for geofence?

There is a site Global Administrative Boundaries which maintains this sort of GIS information in several formats including several ESRI formats, KMZ, and spatialite databases. You can search and ...
backpackcoder's user avatar
1 vote
Accepted

List of the United States (US) state boundaries / borders as latitude/longitude pairs for geofence?

Here is what I was looking for: https://web.archive.org/web/20130615162524/http://eric.clst.org/wupl/Stuff/gz_2010_us_040_00_500k.json I would paste the contents, but the file is over 2MB in size.
Bing's user avatar
  • 146
1 vote

Determine when an object nears a point

==Distance between current location and Destination also comes in mind. It will be an easy and quiet precise implementation ,with the likes of Voronoid diagram(considering the algorithm behind ...
Terah Antwi's user avatar
1 vote

Correct algorithm to determinate if the user is really inside/outside a region

I would keep it very simple. Choose a threshold t such that after t seconds with all samples inside the radius, the system is activated. Your "passing by" example just looks like a case of the radius ...
DoMakeSayThink's user avatar
1 vote

Geofencing (Leave/Enter geofence Timing) Issue?

Having implemented something similar in postgres, I'll share what was implemented on our end.The goal was to detect when a tracking device enters a geofence, how long it dwells inside and when it ...
user2967920's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible