Open krishaamer opened 7 years ago
prohibited areas - dangerous for mappers, private property
is it something that CARTO experts can help us to solve? @jaakla do they have this kind of data
What do you mean by 'handle' here? You can define some areas as prohibited areas, and then correlate geographically (overlay) them with trash points, to see whether a trash point is inside of some; if this is what you mean. The big challenge seems to be to have data of prohibited areas, it is too specific (subjective) to find readymade data from anywhere, unless you narrow the definition quite specifically: e.g. 'military regions' or 'closed to public areas' which are mapped in openstreetmap, I'd guess this covers just small % of areas what you mean here. The best method would be manually creating own map layer for these areas, which may be a challenge organisationally and technically. Technically from mapping point of view it should be finally stored as new carto.com polygon dataset, and then carto enables easy calculation of overlaps.
I meant to show on the map areas that the users should avoid during mapping events
What kind of a shitty prohibited area is it, if it doesn't have a fence, warning posts and/or guards?
Maybe the UN has a global minefield dataset. In general I think the country teams can handle this themselves, as they always have more local knowledge than us.
that's right @lynxlynxlynx local teams have more local knowledge, maybe I over think here
I've been in several places in countries where you can get easily arrested (or even killed) by just being in a place where you are not supposed to be, and there is no signage about that. Especially walking with GPS and mapping is quite a sensitive sport - think anything even remotely linked to military, security, industrial intelligence or crime-related activities, and in some countries you cannot enter any 'private land' without permission, see this warning for example. But this is indeed a knowledge only locals can provide. We/You can probably only provide technical tool to map such off-limits locations.
This is out of scope if you ask me. Our goal is to map the waste, not areas potentially dangerous for mapping (anything).
@kristiinapalu What's exactly the spec for the "it" that would take 12h of dev?
@krishaamer - Sorry for not explaining. ‘It’ would mean that within 12h dev creates:
add/edit prohibited areas
Drawing and editing of areas as polygons on map can be quite complex task, 2 orders of magnitude more tricky than adding and editing points on map. Polygons in general may include islands, holes, complex shapes following complex rivers or shorelines, users can easily draw invalid ones (with self-crossings, overlaps) etc. Maybe I'm overthinking here - if it is about few simple polygons then that would not be that difficult. How do you imagine this to work - any sample?
@jaakla Thank you for your feedback. I'll try to explain.
First of all, with this task, we need a developer who has knowledge of Google maps API's.
There is not need to develop code to display and mark polygons on Google maps, you can use this git repository for that: https://github.com/react-community/react-native-maps#polygon-creator
The developer needs to:
This dev 12h time isn't to develop the polygons.
Please let me know if I have misunderstood this task
Yep, this component function seems to cover the most basic case: adding (no editing) of simple and small low-accuracy polygons, and this could be enough for many or even most cases. This library does not seem to have "point in polygon" algorithms. This could become complex for generic case also, but here is one simple Java one which works with simple cases (no holes/islands,self-intersections, no crossing 180-degree line etc):
static boolean isPointInPolygon(PolygonGeometry poly, MapPos pos) {
MapPosVector poses = poly.getPoses();
int nvert = (int)poses.size();
double testx = pos.getX(), testy = pos.getY();
boolean c = false;
int i, j;
for (i = 0, j = nvert-1; i < nvert; j = i++) {
MapPos vi = poses.get(i);
MapPos vj = poses.get(j);
if (((vi.getY()>testy) != (vj.getY()>testy)) &&
(testx < (vj.getX()-vi.getX()) * (testy-vi.getY()) / (vj.getY()-vi.getY()) + vi.getX())) {
c = !c;
}
}
return c;
}
This solution would also help to mark down areas where mobile phone usage is not recommended for safety reasons - we could allow just GPS coordinates/address based mapping there (without photos). Example from Kenya which they'd like to use: https://www.sde.co.ke/thenairobian/article/2001267529/muggings-paradise-seven-danger-spots-to-avoid-in-nairobi
prohibited in what sense?