Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#6834 closed enhancement (fixed)

[Patch] Imagery providers slippy map enhancements

Reported by: Don-vip Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc:

Description (last modified by Don-vip)

Hi,
Please find attached a proposed patch (V2) to enhance further the one I submitted in #6825.
This patch allows to:

  • display several bounds for a single provider (useful for imagery providers that have distinct, non-adjacent, bounds)
  • display polygon shapes (it's going to be very useful for the French "GéoLittoral" bounds that cover the entire Atlantic coasts, rather than draw a simple rectangle across all the country)

Here's what it looks like:

The Maps wiki page has to be improved as described in the attached XML file (V2), but this change should be backward-compatible with older JOSM version.

Attachments (6)

josm_imagery_enhanced.png (102.2 KB) - added by Don-vip 8 years ago.
Maps-CRAIG-Auvergne.xml (2.3 KB) - added by Don-vip 8 years ago.
patch.diff (39.5 KB) - added by Don-vip 8 years ago.
patchV2.diff (39.3 KB) - added by Don-vip 8 years ago.
Maps-CRAIG-Auvergne-V2.xml (2.5 KB) - added by Don-vip 8 years ago.
patchMinSize.diff (798 bytes) - added by Don-vip 8 years ago.

Download all attachments as: .zip

Change History (20)

Changed 8 years ago by Don-vip

Attachment: josm_imagery_enhanced.png added

Changed 8 years ago by Don-vip

Attachment: Maps-CRAIG-Auvergne.xml added

Changed 8 years ago by Don-vip

Attachment: patch.diff added

comment:1 Changed 8 years ago by Don-vip

Description: modified (diff)

comment:2 Changed 8 years ago by Don-vip

Description: modified (diff)

comment:3 Changed 8 years ago by stoecker

Did you handle the case, that bounds contains a low resolution all-over-bounds and shape a more detailed one? In this case only the shapes should be displayed.

comment:4 Changed 8 years ago by bastiK

What about this format:

    <imagery>
        <entry>
            <name>CRAIG - Auvergne 30 cm</name>
            <type>wms</type>
            <url><![CDATA[http://wms.craig.fr/osm?service=wms&request=getmap&version=1.1.1&layers=auvergne&format=image/jpeg&]]></url>
            <bounds min-lat='44.604' min-lon='2.045' max-lat='46.822' max-lon='4.507'>
                <shape>
                    <point lat='45.4023663' lon='2.4599585' />
                    <point lat='45.4286348' lon='2.3254017' />
                    <point lat='44.9943663' lon='2.0451281' />
                    <point lat='44.6038115' lon='2.1840500' />
                    <point lat='44.6327309' lon='2.5051357' />
                </shape>
                <shape>
                    <point lat='46.3179797' lon='4.0296102' />
                    <point lat='46.4658971' lon='4.0317945' />
                    <point lat='46.5490366' lon='3.7600585' />
                    <point lat='46.7794611' lon='3.6255192' />
                </shape>
            </bounds>
            <attribution-text mandatory='true'>Orthophotographie CRAIG/TopoGEODIS 2009-2010</attribution-text>
            <attribution-url>http://wiki.openstreetmap.org/wiki/WikiProject_France/CRAIG</attribution-url>
            <country-code>FR</country-code>
        </entry>
    </imagery>

After all the shape describes the bounds and you could specify multiple polygons if that is needed.

comment:5 Changed 8 years ago by Don-vip

I like it. I will change the format to multiple <shape> inside a single <bounds> tag.
The bounds rectangle will only be displayed if it doesn't contain shapes.

Changed 8 years ago by Don-vip

Attachment: patchV2.diff added

Changed 8 years ago by Don-vip

Attachment: Maps-CRAIG-Auvergne-V2.xml added

comment:6 Changed 8 years ago by Don-vip

Description: modified (diff)

comment:7 Changed 8 years ago by Don-vip

Okay, V2 should do the trick.

comment:8 Changed 8 years ago by bastiK

Resolution: fixed
Status: newclosed

In [4423/josm]:

applied #6834 - Imagery providers slippy map enhancements: polygon support (patch by Don-vip, modified)

comment:9 Changed 8 years ago by bastiK

comment:10 Changed 8 years ago by bastiK

The component layout is still a little erratic. Especially for the default size of the preferences dialog, the table next to the map is somewhat squeezed.

comment:11 Changed 8 years ago by stoecker

@Don-Vip:

The format description at Maps must be updated to reflect changes.

comment:12 Changed 8 years ago by Don-vip

Done :)

Changed 8 years ago by Don-vip

Attachment: patchMinSize.diff added

comment:13 Changed 8 years ago by Don-vip

@bastiK:

You're right. See patchMinSize.diff to fix that :)

comment:14 Changed 8 years ago by bastiK

In [4425/josm]:

applied #6834 - component layout (patch by Don-vip)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.