New branch for default typ file

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

New branch for default typ file

Gerd Petermann
Hi all,

I've created a new branch now with changes proposed by Joris. I hope this helps bringing this forward.
Attached is a document from Joris.

Gerd
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Proposed changes default-style.docx (22K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: New branch for default typ file

Ticker Berkin
Hi all

Some comments on this and other requests/ideas relating to TYP file.

Beware of moving the test for building=* up in the file - there might
be other, more significant, tags that won't be triggered

My Garmin device doesn't show polygons with type > 0x5f, lines > 0x3d, points > 0x72. I haven't tested the behaviour with a TYP file

I feel that the default style and associated TYP file should not use
extended types, and stick as far as possible to well known Garmin
meanings for type. A couple of extended types have crept into the
default style recently.

However, some of the Garmin types are overloaded with slightly
different OSM meanings and could be spread out over unused types. eg
polygon 0x17 is used for common, garden, park, playground,
square/plaza, greenfield, meadow, grass, village_green but there are
unused types that look similar (0x14-16, 0x1e-20)

Having change some of these mappings for my system, I'd like to be able
to name them correctly in the TYP file but not change any other aspect
of their representation from the device default. mkgmap (and possibly
the TYP format) doesn't allow just:
;
[_polygon]
Type=0x1b
String=Farm
[end]
;
Does anyone know if it would be possible to change mkgmap to allow
this? It is possible to change the representation but not supply the
string and the device shows it's inbuilt title.

Concerning language/translation, there should always be a default
language translation (American-english?), followed by common language
differences, eg
;
[_polygon]
Type=0x25
String=Square
String1=0x01,Place
String1=0x02,German
for this
String1=0x05,Piazza
String1=0x08,Plaza
Xpm=...
...

Another TYP usage is to have transparent polygons showing counties,
small island name etc, such that hovering over them gives useful
information. Again, the TYP compiler won't allow a transparent block
colour, but would be nice to be able to say:
;
[_polygon]
Type=0x58
String=County
Xpm="0 0 1 0"
    "a c none"
[end]
;
It is possible to get round this by having a bit-map with 2 colours and
not using the non-transparent one. Another way of getting a similar
effect is to reduce the [_drawOrder] for this type, but this is
incorrect with transparent maps.

On the subject of _drawOrder, I use --order-by-decreasing-area and have
all polygons from 0x01 to 0x5f to set to the same level except 0x4b
(map background). I have attached a simple patch that stops this being
a special case by causing the background to be written before the Sea.
@gerd - can you apply - thanks.

I haven't been through all of Joris's document in detail and will
probably have more comments

I also have lots of minor changes to the default style that shouldn't
be controversial and will post this later

Regards
Ticker

On Tue, 2018-10-30 at 10:00 +0000, Gerd Petermann wrote:

> Hi all,
>
> I've created a new branch now with changes proposed by Joris. I hope
> this helps bringing this forward.
> Attached is a document from Joris.
>
> Gerd
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

backgroundArea.patch (820 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: New branch for default typ file

Gerd Petermann
Hi Ticker,

Ticker Berkin wrote
> Does anyone know if it would be possible to change mkgmap to allow
> this?

Not sure if this is what you want, did you try default_name?
See e.g.
amenity=emergency_phone [0x2f12 resolution 24 default_name 'Emergency
Phone']

I don't understand the comment in the patch:
                background.setFullArea(Long.MAX_VALUE-1); // cf: SeaGenerator.java:
seaSize
Wouldn't it be better to have a method named something like
setAreaSizeToMax() ?

Gerd



--
Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: New branch for default typ file

Ticker Berkin
Hi Gerd

It's not the name of the map feature that I'm talking about; rather the
string representation of the type which my device displays, along with
the name, when the map feature is selected.

So, for instance, I'd like to use one of the other the Park
representations, say 0x20, for leisure=garden. In the TYP file I'd like
to set the String for this type, but don't want to override the colour
/ bitmap or whatever representation.

Concerning the background polygon, I want to set it's area to bigger
than the sea area, where the default is set in SeaGenerator.java with
the comment:

/**
 * When order-by-decreasing-area we need all bit of sea to be output
consistently.
 * Unless _draworder changes things, having seaSize as BIG causes
polygons beyond the
 * coastline to be shown. To hide these and have the sea show up to the
high-tide
 * coastline, can set this to be very small instead (or use
_draworder).
 * <p>
 * mkgmap:drawLevel can be used to override this value in the style -
the default style has:
 * natural=sea { add mkgmap:skipSizeFilter=true; set mkgmap:drawLevel=2
} [0x32 resolution 10]
 * which is equivalent to Long.MAX_VALUE-2.
 */
private static final long seaSize = Long.MAX_VALUE-2; // sea is BIG

I don't think having method just used by addBackground adds anything to
clarity. I could put a constant with MAX_VALUE-1 and comment into
MapperBasedMapDataSource instead if you'd prefer


Regards
Ticker

On Tue, 2018-11-06 at 00:16 -0600, Gerd Petermann wrote:

> Hi Ticker,
>
> Ticker Berkin wrote
> > Does anyone know if it would be possible to change mkgmap to allow
> > this?
>
> Not sure if this is what you want, did you try default_name?
> See e.g.
> amenity=emergency_phone [0x2f12 resolution 24 default_name 'Emergency
> Phone']
>
> I don't understand the comment in the patch:
> background.setFullArea(Long.MAX_VALUE-1); // cf:
> SeaGenerator.java:
> seaSize
> Wouldn't it be better to have a method named something like
> setAreaSizeToMax() ?
>
> Gerd
>
>
>
> --
> Sent from:
> http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: New branch for default typ file

Gerd Petermann
Hi Ticker,

I think what confused me was the use of abbreviation cf (I did not know that) and that seaSize is a named constant which means
it should be in upper case. See my changes in r4248.
There is another confusing comment in Way.java:
// this is unadulterated size, +ve if clockwise
I guess that +ve means positive? This is hard to understand for a non-native speaker who grew up before SMS and Twitter and just learned to use smileys ;-)

Gerd

________________________________________
Von: mkgmap-dev <[hidden email]> im Auftrag von Ticker Berkin <[hidden email]>
Gesendet: Dienstag, 6. November 2018 10:43
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] New branch for default typ file

Hi Gerd

It's not the name of the map feature that I'm talking about; rather the
string representation of the type which my device displays, along with
the name, when the map feature is selected.

So, for instance, I'd like to use one of the other the Park
representations, say 0x20, for leisure=garden. In the TYP file I'd like
to set the String for this type, but don't want to override the colour
/ bitmap or whatever representation.

Concerning the background polygon, I want to set it's area to bigger
than the sea area, where the default is set in SeaGenerator.java with
the comment:

/**
 * When order-by-decreasing-area we need all bit of sea to be output
consistently.
 * Unless _draworder changes things, having seaSize as BIG causes
polygons beyond the
 * coastline to be shown. To hide these and have the sea show up to the
high-tide
 * coastline, can set this to be very small instead (or use
_draworder).
 * <p>
 * mkgmap:drawLevel can be used to override this value in the style -
the default style has:
 * natural=sea { add mkgmap:skipSizeFilter=true; set mkgmap:drawLevel=2
} [0x32 resolution 10]
 * which is equivalent to Long.MAX_VALUE-2.
 */
private static final long seaSize = Long.MAX_VALUE-2; // sea is BIG

I don't think having method just used by addBackground adds anything to
clarity. I could put a constant with MAX_VALUE-1 and comment into
MapperBasedMapDataSource instead if you'd prefer


Regards
Ticker

On Tue, 2018-11-06 at 00:16 -0600, Gerd Petermann wrote:

> Hi Ticker,
>
> Ticker Berkin wrote
> > Does anyone know if it would be possible to change mkgmap to allow
> > this?
>
> Not sure if this is what you want, did you try default_name?
> See e.g.
> amenity=emergency_phone [0x2f12 resolution 24 default_name 'Emergency
> Phone']
>
> I don't understand the comment in the patch:
>               background.setFullArea(Long.MAX_VALUE-1); // cf:
> SeaGenerator.java:
> seaSize
> Wouldn't it be better to have a method named something like
> setAreaSizeToMax() ?
>
> Gerd
>
>
>
> --
> Sent from:
> http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: New branch for default typ file

AlaskaDave
"+ve" does indeed mean positive.  It's an older shorthand term sometimes used by scientists in the U.S.

Dave

On Wed, Nov 7, 2018 at 1:02 PM Gerd Petermann <[hidden email]> wrote:
Hi Ticker,

I think what confused me was the use of abbreviation cf (I did not know that) and that seaSize is a named constant which means
it should be in upper case. See my changes in r4248.
There is another confusing comment in Way.java:
// this is unadulterated size, +ve if clockwise
I guess that +ve means positive? This is hard to understand for a non-native speaker who grew up before SMS and Twitter and just learned to use smileys ;-)

Gerd

________________________________________
Von: mkgmap-dev <[hidden email]> im Auftrag von Ticker Berkin <[hidden email]>
Gesendet: Dienstag, 6. November 2018 10:43
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] New branch for default typ file

Hi Gerd

It's not the name of the map feature that I'm talking about; rather the
string representation of the type which my device displays, along with
the name, when the map feature is selected.

So, for instance, I'd like to use one of the other the Park
representations, say 0x20, for leisure=garden. In the TYP file I'd like
to set the String for this type, but don't want to override the colour
/ bitmap or whatever representation.

Concerning the background polygon, I want to set it's area to bigger
than the sea area, where the default is set in SeaGenerator.java with
the comment:

/**
 * When order-by-decreasing-area we need all bit of sea to be output
consistently.
 * Unless _draworder changes things, having seaSize as BIG causes
polygons beyond the
 * coastline to be shown. To hide these and have the sea show up to the
high-tide
 * coastline, can set this to be very small instead (or use
_draworder).
 * <p>
 * mkgmap:drawLevel can be used to override this value in the style -
the default style has:
 * natural=sea { add mkgmap:skipSizeFilter=true; set mkgmap:drawLevel=2
} [0x32 resolution 10]
 * which is equivalent to Long.MAX_VALUE-2.
 */
private static final long seaSize = Long.MAX_VALUE-2; // sea is BIG

I don't think having method just used by addBackground adds anything to
clarity. I could put a constant with MAX_VALUE-1 and comment into
MapperBasedMapDataSource instead if you'd prefer


Regards
Ticker

On Tue, 2018-11-06 at 00:16 -0600, Gerd Petermann wrote:
> Hi Ticker,
>
> Ticker Berkin wrote
> > Does anyone know if it would be possible to change mkgmap to allow
> > this?
>
> Not sure if this is what you want, did you try default_name?
> See e.g.
> amenity=emergency_phone [0x2f12 resolution 24 default_name 'Emergency
> Phone']
>
> I don't understand the comment in the patch:
>               background.setFullArea(Long.MAX_VALUE-1); // cf:
> SeaGenerator.java:
> seaSize
> Wouldn't it be better to have a method named something like
> setAreaSizeToMax() ?
>
> Gerd
>
>
>
> --
> Sent from:
> http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


--
Dave Swarthout
Homer, Alaska
Chiang Mai, Thailand
Travel Blog at http://dswarthout.blogspot.com

_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: New branch for default typ file

Ticker Berkin
Hi Gerd

Sorry about the various language/abbreviation issues - I'll do my best
to avoid them in future.

I'm happy with your modified patch for setting background / sea areas.

Thanks
Ticker

PS - I'm well before twitter and SMS and refuse to use smilies ;)

On Wed, 2018-11-07 at 14:39 +0700, Dave Swarthout wrote:

> "+ve" does indeed mean positive.  It's an older shorthand term
> sometimes used by scientists in the U.S.
>
> Dave
>
> On Wed, Nov 7, 2018 at 1:02 PM Gerd Petermann <
> [hidden email]> wrote:
> > Hi Ticker,
> >
> > I think what confused me was the use of abbreviation cf (I did not
> > know that) and that seaSize is a named constant which means
> > it should be in upper case. See my changes in r4248.
> > There is another confusing comment in Way.java:
> > // this is unadulterated size, +ve if clockwise
> > I guess that +ve means positive? This is hard to understand for a
> > non-native speaker who grew up before SMS and Twitter and just
> > learned to use smileys ;-)
> >
> > Gerd
> >
> > ________________________________________
> > Von: mkgmap-dev <[hidden email]> im Auftrag
> > von Ticker Berkin <[hidden email]>
> > Gesendet: Dienstag, 6. November 2018 10:43
> > An: Development list for mkgmap
> > Betreff: Re: [mkgmap-dev] New branch for default typ file
> >
> > Hi Gerd
> >
> > It's not the name of the map feature that I'm talking about; rather
> > the
> > string representation of the type which my device displays, along
> > with
> > the name, when the map feature is selected.
> >
> > So, for instance, I'd like to use one of the other the Park
> > representations, say 0x20, for leisure=garden. In the TYP file I'd
> > like
> > to set the String for this type, but don't want to override the
> > colour
> > / bitmap or whatever representation.
> >
> > Concerning the background polygon, I want to set it's area to
> > bigger
> > than the sea area, where the default is set in SeaGenerator.java
> > with
> > the comment:
> >
> > /**
> >  * When order-by-decreasing-area we need all bit of sea to be
> > output
> > consistently.
> >  * Unless _draworder changes things, having seaSize as BIG causes
> > polygons beyond the
> >  * coastline to be shown. To hide these and have the sea show up to
> > the
> > high-tide
> >  * coastline, can set this to be very small instead (or use
> > _draworder).
> >  * <p>
> >  * mkgmap:drawLevel can be used to override this value in the style
> > -
> > the default style has:
> >  * natural=sea { add mkgmap:skipSizeFilter=true; set
> > mkgmap:drawLevel=2
> > } [0x32 resolution 10]
> >  * which is equivalent to Long.MAX_VALUE-2.
> >  */
> > private static final long seaSize = Long.MAX_VALUE-2; // sea is BIG
> >
> > I don't think having method just used by addBackground adds
> > anything to
> > clarity. I could put a constant with MAX_VALUE-1 and comment into
> > MapperBasedMapDataSource instead if you'd prefer
> >
> >
> > Regards
> > Ticker
> >
> > On Tue, 2018-11-06 at 00:16 -0600, Gerd Petermann wrote:
> > > Hi Ticker,
> > >
> > > Ticker Berkin wrote
> > > > Does anyone know if it would be possible to change mkgmap to
> > allow
> > > > this?
> > >
> > > Not sure if this is what you want, did you try default_name?
> > > See e.g.
> > > amenity=emergency_phone [0x2f12 resolution 24 default_name
> > 'Emergency
> > > Phone']
> > >
> > > I don't understand the comment in the patch:
> > >               background.setFullArea(Long.MAX_VALUE-1); // cf:
> > > SeaGenerator.java:
> > > seaSize
> > > Wouldn't it be better to have a method named something like
> > > setAreaSizeToMax() ?
> > >
> > > Gerd
> > >
> > >
> > >
> > > --
> > > Sent from:
> > > http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
> > > _______________________________________________
> > > mkgmap-dev mailing list
> > > [hidden email]
> > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> > _______________________________________________
> > mkgmap-dev mailing list
> > [hidden email]
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> > _______________________________________________
> > mkgmap-dev mailing list
> > [hidden email]
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> >
>
> _______________________________________________
> mkgmap-dev mailing list
> [hidden email]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev