Reputation
479
Top tag
Next privilege 500 Rep.
Access review queues
Badges
3 17
Impact
~16k people reached

Oct
1
comment What algorithm allows me to calculate the set of all points inside a polygon?
@Vince You can migrate it to the main StackOverlow site, if you think it increases the chances of getting answered.
Oct
1
comment What algorithm allows me to calculate the set of all points inside a polygon?
Done. See update 3.
Oct
1
comment What algorithm allows me to calculate the set of all points inside a polygon?
This is a Minecraft map, which you can imagine as a 3-dimensional raster with every "pixel" being a block of 1 meter in length, width and height. The only command, which my renderer accepts is this world.setBlock(x, y, z, type), where x,y,z are coordinates and type is the material of the block. This command puts one block at exactly those coordinates. The space around it remains free. When I want to draw lines, I need to do several calls like that. When I want to fill an area (e. g. a flat roof), I have to do those calls for all of the internal points of the polygon.
Oct
1
comment What algorithm allows me to calculate the set of all points inside a polygon?
The simplest possible roof is flat. Many buildings in cities have flat roofs. That's why first I want to create plain, flat roofs.
Oct
1
comment What algorithm allows me to calculate the set of all points inside a polygon?
@FaridCher Basically yes. To make sure that I express myself good enough, I've added update 2 with an image. There is a polygon on a grid. I want to find out all the green points (points inside the polygon).
Oct
1
comment What algorithm allows me to calculate the set of all points inside a polygon?
@FaridCher The map is a grid (I have integer coordinates). Isn't a grid synonymous to raster?
Oct
1
comment What algorithm allows me to calculate the set of all points inside a polygon?
Thanks. Do you know what algorithms (a name is sufficient) these tools use? I need to implement this thing myself (or find a Java library, which does it). Maybe there is a specific name for this task?
Oct
1
comment What algorithm allows me to calculate the set of all points inside a polygon?
I have a polygon defined by 1) points and 2) lines between them (derived from 1 using Bresenham algorithm). Those are the input data. I need to find all points inside the polygon. Look at the image - if you want to put a roof on a building, you need (in its simplest form) put blocks in its entire area.
Sep
30
comment What error am I doing when rendering OpenStreetMap roads and buildings in Minecraft?
Are you sure about way 103989044 appearing twice in the file dl.dropboxusercontent.com/u/11776689/… ? I can't find the second appearance of it?
Sep
30
comment What error am I doing when rendering OpenStreetMap roads and buildings in Minecraft?
Thanks for the hint with the version. I didn't know that. Maybe that's causing the problems - I'll figure it out in the evening.
Sep
30
comment What error am I doing when rendering OpenStreetMap roads and buildings in Minecraft?
Thanks. All data are available at dl.dropboxusercontent.com/u/11776689/… . In update 2 above I pasted a sample definition of a building. Is it correct that I have to draw the lines in the following order: 1200207407 - 1200207412 - 1772686869 - 1119746578 - 1119746577 - 1772676000 - 1200207407 ?
Aug
31
comment How do I find out the sea levels?
@whuber Thanks. I'm looking for some easy-to-implement method, which works in 80 % of the cases. I don't need precision because I need this to create a map for a game (nobody will die, if there are a couple of watering errors in the map).
Aug
30
comment How do I find out the sea levels?
What data sets (apart from SRTM Water Body Dataset) can I use to infer sea levels?
Mar
19
comment A format for saving an OpenStreetMap with overlaid points and lines
@ymirsson I'll probably go with OpenLayers, as you suggested. Submit your comment as an answer and I'll accept it.
Mar
16
comment A format for saving an OpenStreetMap with overlaid points and lines
@BradHards Can I create a QGIS file easily (in Java) ?
Mar
16
comment A format for saving an OpenStreetMap with overlaid points and lines
@BradHards The user, who will view this data will have an internet connection (he or she will have a connection to OSM server). But I don't want the user to install any database on the machine. He or she should be able to view those data with as little effort as possible.
Nov
11
comment How to order points of a polygon?
@scai Yes, I know that a relation can have "holes" inside it. For now, I sorted the partial polygons manually.
Nov
6
comment How to read all IDs of all ways inside a polygon?
I tried to run this query, but I ran into some problems. Details can be found here - gis.stackexchange.com/questions/76584/… .
Nov
1
comment How to read all IDs of all ways inside a polygon?
Very interesting. I'll try to formulate a query for getting a list of all buildings inside the polygon. Regarding buildings: By "building" I mean any way, which has a node <tag k="building" v="..."/>.
Nov
1
comment How to read all IDs of all ways inside a polygon?
@BradHards Actually, it's irrelevant whether this happens online or locally. For now, I intend to download the data within the bounding box ( openstreetmap.org/api/0.6/… ), then read all buildings from there and filter out those, which lie inside the polygon boundary (as described on stackoverflow.com/questions/12083093/… ). I'm not finished yet, so if you know an easier way, I'll be glad to hear it.