phyosithu / osm2garmin

Automatically exported from code.google.com/p/osm2garmin
GNU General Public License v2.0
0 stars 0 forks source link

Polygon editor for Regions #80

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, i just want to request a feature where it's possible to open up a map and 
draw a bbox, and when you are done, just click "Ok" and the bbox is added to 
the Regions with the name you have set to it.

Something like this, http://gsak.net/google/polygoneditor.php

Original issue reported on code.google.com by mit...@gmail.com on 12 Jun 2012 at 8:11

GoogleCodeExporter commented 9 years ago
Issue 79 has been merged into this issue.

Original comment by mantl...@gmail.com on 12 Jun 2012 at 10:31

GoogleCodeExporter commented 9 years ago
Other possible option would be import/export of polygons created with 
polygoneditor or other tools, e.g. Google Earth kml/kmz format. I do not think 
Osm2garmin could include it's own map editor. It is out of scope of this simple 
integrating tool.

What is highly desirable is checking of correctness of all defined regions and 
producing a warning before processing starts.

Original comment by mantl...@gmail.com on 12 Jun 2012 at 10:39

GoogleCodeExporter commented 9 years ago
Sounds nice. 

I was more like thinking of a map viewer where you just make a box on the map 
and then it get lat1 lat2 lat1 lat2 from the box and put it in the custom 
region file.

But it's not me coding this stuff, and i don't know if it's possible or hard to 
do :)

Original comment by mit...@gmail.com on 12 Jun 2012 at 10:47

GoogleCodeExporter commented 9 years ago
Maybe this could be something: 
http://today.java.net/pub/a/today/2007/10/30/building-maps-into-swing-app-with-j
xmapviewer.html

Original comment by mit...@gmail.com on 12 Jun 2012 at 10:48

GoogleCodeExporter commented 9 years ago
As mentioned earlier, this tool will not implement map editing interface. The 
reasonable task is to check validity of defined regions. If the user is not OK 
with default regions, it is his responsibility to make his definitions correct 
and his choice to select a proper tool to create his definitions.

Original comment by mantl...@gmail.com on 12 Jun 2012 at 11:32

GoogleCodeExporter commented 9 years ago
It's not a map edit function i am asking for, it's a function to in a simple 
way get a correct bbox for a custom region.

Original comment by mit...@gmail.com on 12 Jun 2012 at 11:34

GoogleCodeExporter commented 9 years ago
This entry in my regions.txt for example:
26.6 34.5 23.2 36.0 Kriti
I don' know if it's correct even if the "Display" map shows a bbox for the 
right place, but it's showing the exactly same bbox if i have 
26.6 36.0 23.2 34.5 Kriti
but this last one get's the result as i posted in issue #79.

No one of theese entries does generate a map.

Original comment by mit...@gmail.com on 12 Jun 2012 at 11:42

GoogleCodeExporter commented 9 years ago
When using 26.6 34.5 23.2 36.0 Kriti i get this output (attached file).

The textfile is anyway showing everything in another order than the osm2garmin 
guis.

Original comment by mit...@gmail.com on 12 Jun 2012 at 11:47

Attachments:

GoogleCodeExporter commented 9 years ago
This is exactly what I want to implement.

The correct order of coordinates values in your regions.txt is like this:
23.2 34.5 26.6 36.0 Kreta

The coordinates in Regions tab of Osm2garmin settings have to follow these 
rules:
Lat1 < Lat2
Lon1 < Lon2

Coordinates order is the same in regions.txt file and Regions tab table. The 
only difference is that region name follows coordinates in regions.txt. 
Excluded regions are marked with a "x" character as the first character of the 
line. Values in regions.txt are space-delimited.

Please note that you can't edit the regions.txt file when Osm2garmin is 
running, otherwise you can get unexpected results!

Original comment by mantl...@gmail.com on 12 Jun 2012 at 12:12

GoogleCodeExporter commented 9 years ago
Sorry, the coordinate order in regions.txt is

[x]lon1 lat1 lon2 lat2 region

while in the Osm2garmin regions tab table it is

[x] region lat1 lon1 lat2 lon2

Original comment by mantl...@gmail.com on 12 Jun 2012 at 12:17

GoogleCodeExporter commented 9 years ago

Original comment by mantl...@gmail.com on 8 Sep 2013 at 9:16