[mkgmap-dev] Options

2015-04-28 Thread Anna Leuchter
Hello Gerd,
sorry for the delay.

better than nothing simply means that this is actually the only possibility, 
to create Points along a way to mark a hiking trail based on relations.
In fact this is not really satiesfying but it is actually the only way. That's 
the reason why i said better than nothing.

OSMCOMPOSER-Software which is a type of frontend to mkgamp has a builtin 
preprocessor, which is able to create points along way relation.
Here you have the possibilty to configure which relations you wanna use e.g 
hiking|cycling|MTB and the minimum lenght, of way beeing part or a relation to 
get a poi.
If there are multiple routes, the pois will be distributed, to fit in a way 
that they are all visible.
Ok, it's clear, depending on length and amount of pois, they will overlap.


regards
Gert


From Gerd Petermann gpetermann_muenchen at hotmail.com on Fri Apr 24 06:35:07 
BST 2015

Hi Gert,

 yes, I think it must be useful, I also see it in Minkos styles at
 http://www.openfietsmap.nl/

 I don't fully understand the better than nothing part .
 The current code adds a POI to each point, so each point has 
 a mkgmap:line2poitype=* tag with values start,end,mid, or inner 
 for the rest.

 The option should be handled with great care, it is likely to
 produce a large number of POI for highly detailed ways
 created by some imports.
 I already thought about an addtional parameter for the option,
 something like --add-pois-to-lines=n where n gives a value in meter
 for the minimum distance between two generated POI when the way
 has more than 3 points. 

 Gerd
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] Multiple relations

2013-11-07 Thread Anna Leuchter
Hi Enrico,

How can you see the image attached MapSource display tha name of the highway
(not the name of the route relation) if there is one or the label
Sconosciuto if there isn't.
I would delete (I don't want to see it). It is possibile?

sorry, but may be i don't understand you.

1. deleting a tag
if you want to delete a tag use delete { key123 } see style manual 4.3.4 page 
11.

2. using route relation names


RELATIONS file

type=route  route=bicycle
{
apply { 
set bike_relation=yes;
set br_name='${name}';
} 
}   

LINES file
... 
highway=track  bike_relation=yes { name '${name}' | '${br_name}' | 
'Sconosciuto' } [0x01 road_class=0 road_speed=0 resolution 24 continue ]
...
In this case, the name of element would be used if it exist and if it not 
exists, the relation name would be used.
If both doesn't exist, name will be set to Sconosciuto

regards

Gert
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] Multiple relations

2013-11-05 Thread Anna Leuchter
Ciao Enrico,


RELATIONS file
...
type=route  route=bicycle
{
apply { 
set bike_relation=yes;
} 
}   

type=route  (route=foot | route=hiking)
{
apply { 
set hike_relation=yes;
} 
}   
...


LINES file
... 
highway=track  bike_relation=yes [0x01 road_class=0 road_speed=0 resolution 24 
continue ]  
highway=track  hike_relation=yes [0x02 road_class=0 road_speed=0 resolution 24 
continue ]  
... 

You can set a tag in RELATIONS file if the way element belongs to a route.
And if there are 2 matches 2 tags will be set.

These tags you can than use in LINES file to create the garmin objects.

regards
Gert
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] Is it possible with --add-poi-to-lines option and style rules to create pois only for ways with a min/max/equal length?

2013-10-29 Thread Anna Leuchter
Hi Henning,

1.
Option could be: --add-poi-to-routes=100,1000,1

Does this mean that every 100 meters + every 100meters + every 1 meters of 
the route a mark would be set?
So at 1000m there would be 2 marks? One for 100m + one for 1000m?
This imo wouldn't make sense for waymarks or?

2. if way is part of multiple routes
in this case, like actually with the --add-poi-to-lines option, the created 
marks also might created at the same distances/place and than overlaying each 
other.
Hardley affected will be only those routes which starts at the same point and 
following partially the same way.
Anyway that can happens to in the other cases if routes only share some 
intermediate part.
In that case the those overlaying marks must be shifted a bit, so that all are 
visisble.



regards
Gert
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] Is it possible with --add-poi-to-lines option and style rules to create pois only for ways with a min/max/equal length?

2013-10-27 Thread Anna Leuchter
Hi,

i try to create a map including hiking trail markings usin r2748.

So far i succeded using --add-poi-to-lines option and making the needed setting 
 within relation and points style files.
For every way part of a hiking route a poi is created.

But to prevent map to be overcrowded by those trail marking pois, i would like 
to create those kind of POIs only for way parts with a minimum length.

Something like highway=*  length() 100 {set mkgmap:line2poi=false} in the 
lines file, doesn't seems to work.
(As far as i read meanwhile, points are processed before lines, so this can't 
work.)

Is there a way with actuall code version to achieve it?

best regards

Gert
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] Is it possible with --add-poi-to-lines option and style rules to create pois only for ways with a min/max/equal length?

2013-10-27 Thread Anna Leuchter
Hi WanMil, Hello Henning,

thanks. i had been afraid that it does not work. 

Wouldn't it be enough to add something like a mkgmap:line2poilength to the poi 
which than can be used later in style.?
Ok, probably is the idea of Henning the better solution.


regards
Gert
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] variable filters: substring filter fails with java.lang.StringIndexOutOfBoundsException: String index out of range

2013-10-16 Thread Anna Leuchter
Hello,
 
i used rev.2748.
if i use the substring variable filter and the variable is shorter than the 
substring command end-index, i always got an exception.
 
java.lang.StringIndexOutOfBoundsException: String index out of range: 7
at java.lang.String.substring(Unknown Source)
at 
uk.me.parabola.mkgmap.osmstyle.actions.SubstringFilter.doFilter(SubstringFilter.java:64)
at 
uk.me.parabola.mkgmap.osmstyle.actions.ValueFilter.filter(ValueFilter.java:34)
at 
uk.me.parabola.mkgmap.osmstyle.actions.ValueItem.getValue(ValueItem.java:48)
at 
uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.build(ValueBuilder.java:63)
at 
uk.me.parabola.mkgmap.osmstyle.actions.NameAction.perform(NameAction.java:51)
at 
uk.me.parabola.mkgmap.osmstyle.ActionRule.resolveType(ActionRule.java:72)
at uk.me.parabola.mkgmap.osmstyle.RuleSet.resolveType(RuleSet.java:68)
at 
uk.me.parabola.mkgmap.osmstyle.StyledConverter.convertWay(StyledConverter.java:228)
at 
uk.me.parabola.mkgmap.reader.osm.ElementSaver.convert(ElementSaver.java:232)
at 
uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.load(Osm5MapDataSource.java:71)
at 
uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:127)
at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:167)
at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:63)
at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:243)
at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:239)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
 
For example:
lref contains ABC
 
lcn_from_relation=yes {name '${lref|substring:0:7|highway-symbol:oval:9} 
${lname}' | '${lref|highway-symbol:oval:9} (${lname|not-equal:lref})' | 
'${lref|highway-symbol:oval:9}' | '${name}'; add mkgmap:display_name = '${name} 
(${ref})' }
fails with exception as  in substring:0:7 the end-point exceeds the ABC 
length.
 
Is this intended behaviour or simply  missing an exception handling for this 
case?
 
regards
Gert
P.D
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] variable filters: substring filter fails with java.lang.StringIndexOutOfBoundsException: String index out of range

2013-10-16 Thread Anna Leuchter
Hello Gerd,

thanks for the info and the patch.
Anyway i didn't tested it as i forgot how to incorporate patches into source.
Actually to much effort for me to re-learn this java stuff.(may be during 
winter time i will give  it a try)

My workaround is actually:
- filling the field with sign( of type which i do not expect being there 
normally) up to max. count i need.
- reduce to max. possible count
- remove the not needed superflous signs

for ex.:

rcn_from_relation=yes { set rref = '$(rref)#}'; set rref = 
'${rref|substring:0:9'; set rref = '${rref|subst:[#]*~}' ; name 
'${rref|highway-symbol:oval:9}.


Maybe if you feel it's worth to incoorporate your patch into the code would be 
nice if you could manage that.

best regards
Gert
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


[mkgmap-dev] variable filters: substring filter fails with java.lang.StringIndexOutOfBoundsException: String index out of range

2013-10-15 Thread Anna Leuchter
Hello,



i used rev.2748.

if i use the substring variable filter and the variable is shorter than the substring command end-index, i always got an exception.



java.lang.StringIndexOutOfBoundsException: String index out of range: 7
 at java.lang.String.substring(Unknown Source)
 at uk.me.parabola.mkgmap.osmstyle.actions.SubstringFilter.doFilter(SubstringFilter.java:64)
 at uk.me.parabola.mkgmap.osmstyle.actions.ValueFilter.filter(ValueFilter.java:34)
 at uk.me.parabola.mkgmap.osmstyle.actions.ValueItem.getValue(ValueItem.java:48)
 at uk.me.parabola.mkgmap.osmstyle.actions.ValueBuilder.build(ValueBuilder.java:63)
 at uk.me.parabola.mkgmap.osmstyle.actions.NameAction.perform(NameAction.java:51)
 at uk.me.parabola.mkgmap.osmstyle.ActionRule.resolveType(ActionRule.java:72)
 at uk.me.parabola.mkgmap.osmstyle.RuleSet.resolveType(RuleSet.java:68)
 at uk.me.parabola.mkgmap.osmstyle.StyledConverter.convertWay(StyledConverter.java:228)
 at uk.me.parabola.mkgmap.reader.osm.ElementSaver.convert(ElementSaver.java:232)
 at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.load(Osm5MapDataSource.java:71)
 at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.load(OsmMapDataSource.java:127)
 at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:167)
 at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:63)
 at uk.me.parabola.mkgmap.main.Main1.call(Main.java:243)
 at uk.me.parabola.mkgmap.main.Main1.call(Main.java:239)
 at java.util.concurrent.FutureTaskSync.innerRun(Unknown Source)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutorWorker.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)



For example:

lref contains ABC



lcn_from_relation=yes {name {lrefsubstring:0:7highway-symbol:oval:9} {lname}  {lrefhighway-symbol:oval:9} ({lnamenot-equal:lref})  {lrefhighway-symbol:oval:9}  {name}; add mkgmap:display_name = {name} ({ref}) }

fails with exception as in substring:0:7 the end-point exceeds the ABC length.



Is this intended behaviour or simply missing an exception handling for this case?



regards

Gert

P.D




___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev