[talk-au] JOSM multipolygon how-to?
Graeme Fitzpatrick
graemefitz1 at gmail.com
Fri Apr 8 05:27:14 UTC 2022
Was going to mention a couple of days ago - it worked!!! :-)
Was able to successfully create my lake with an island in it & have also
added islands to other lakes already mapped as MP :sunglasses" :-)
So thanks everybody for your help! :-)
Another question though, thanks.
I'm seeing some relations marked in JOSM as "incomplete":
https://www.openstreetmap.org/relation/9728292#map=14/-28.1002/153.4320
appears OK here, but not in JOSM?
How do you fix something like that?
Thanks
Graeme
On Thu, 31 Mar 2022 at 17:06, Graeme Fitzpatrick <graemefitz1 at gmail.com>
wrote:
> LOL!
>
> Go to bed!
>
> Talk more tmw.
>
> Thanks
>
> Graeme
>
>
> On Thu, 31 Mar 2022 at 15:42, stevea <steveaOSM at softworkers.com> wrote:
>
>> Thanks for the details: you are up-to-date w.r.t. JOSM and Java, the
>> Windows version is OK, but there does exist Windows 11 now, that upgrade is
>> "up to you." Windows 10 is still OK and if it's working fine, you can keep
>> using it.
>>
>> The reason you think iD is friendlier is because you've gotten accustomed
>> to it. Old dogs CAN learn new tricks! The thing to think about is that iD
>> does a lot of "hiding" of things from you to make a candy-sweet
>> user-interface experience, whereas JOSM expects you to know about some
>> basics (start on the bottom rung of the ladder, but, hey, we all do!) and
>> then you simply have to climb. But, the pace at which you do is all up to
>> you, so there is no pressure. There might be some wrinkled brow and
>> question marks along the way, but learning a new thing is like learning any
>> new thing. You study something that explains it in a manner that makes
>> sense to you, to toot around with it until you're comfortable with it
>> (perhaps with some sour notes while tooting, that's OK), then it is yours
>> forever.
>>
>> Some basics: OSM is data. OSM's data structures are of four basic types
>> called nodes, ways, closed ways (polygons) and relations. The first two
>> are quite basic (points and directional line segments), the third is simply
>> a way that "goes back and touches itself back at the beginning" and
>> relations are what's the hard nut to crack. Any of these four types can
>> (and should...MUST, really) have at least one tag, a key=value pair. For
>> relations, there are a variety of different flavors of tags to make
>> different flavors of relation types (like routes, multipolygons,
>> boundaries...) AND, very importantly, RELATIONS HAVE MEMBERS. At least
>> one, usually many more than one. Members are the "collection of things"
>> that make up the relation. For a multipolygon, this is the collection of
>> polygons. For a route, the segments of connected ways that make up the
>> route. For a boundary, the ways (or closed ways — polygons) that make up
>> the boundary. And so on.
>>
>> For a multipolygon relation, there are something called "role tags."
>> Let's start simple: a building with a single courtyard that isn't the
>> building. You'd have a polygon representing the building and a polygon
>> INSIDE the building polygon representing the courtyard. (So, two
>> MEMBERS). Additionally, on a multipolygon, the BUILDING gets a "role tag"
>> with value "outer" and the courtyard gets a "role tag" with value "inner."
>> This tells OSM "an outer building has an inner courtyard" like this:
>> polygon tagged building=yes is a member of the multipolygon, and it gets
>> role tag of outer; polygon tagged courtyard=yes (I'm making that up) is
>> another member of the multipolygon , and it gets role tag of inner. Done.
>>
>> Let's make this. After you did your "Create Multipolygon," you likely
>> have (off to the right in your "panes" JOSM displays) a pane called
>> "Relations: 1" (because you just created 1 relation and this is a new JOSM
>> session). If you don't, the "pane panel" has little drop-down triangles
>> that allow you to "turn on and off" which panes you want displayed in the
>> "pane panel" (again, this panel toggles on and off easily by repeatedly
>> clicking the Tab key, so you can see what I'm talking about). Walk down
>> the "pane panel" and click these "disclosure triangles" on and off until
>> you have a useful set of panes in this panel: Layers, Tags, Selection(s)
>> abbreviated Sel., Relations...you might see or want others, like Command
>> Stack, Author, Conflict, Validation Results, Map Paint Styles...but they're
>> not germane right now. In the Rel pane, single-click your new relation (it
>> should be the only one there, as you haven't downloaded anything, have
>> you?) and notice there are three buttons below it in this pane: Select,
>> Search and History. You could click Select (after a single-click of the
>> relation) or you could double-click the relation. This brings up the
>> relation window I described before: top half, and a bottom-left and
>> bottom-right (with buttons along the lower-left and lower-middle). There
>> are buttons along the left of the top part, but I never use them, you might
>> not need to, either. In the case of a multipolygon relation, there needs
>> to be a tag of type=multipolygon. That's already been done for you by the
>> "Create Multipolygon" menu item, so it's already there
>>
>> Now, with that relation window open, notice that in the lower-left, there
>> are the two members that you selected to "make" this multipolygon (with the
>> menu command "Create Multipolygon" after you selected the polygons that you
>> wanted to make the multipolygon out of). See them? You can also see that
>> in the top half of this relation editing window is "type" on the left side
>> (the key) "multipolygon" (the value of the key, making up a whole
>> type=multipolygon tag). So far, so good. What JOSM (likely) doesn't know,
>> is which one of the polygons is outer (the "whole") and which one is inner
>> (the "hole!"). So, notice that at the top of the lower-left is "Role."
>> Double-click (selecting it) the one-of-two polygons which is the outer (it
>> "lights up" to show you it is selected), then single-click off to its left,
>> right under "Role." Type the word "outer" (return). Do the same thing to
>> the other one (select, click to left...) except this time, type the word
>> "inner" (return). Now, click the OK button at the bottom of the relation
>> editor window, and you've just created a real multipolygon!
>>
>> I might be forgetting something. But to really add real data to OSM,
>> you'd:
>>
>> 1) Open JOSM. You get the "welcome" screen, no map. Huh? Yeah, keep
>> reading...
>> 2) Use the green down-arrow to select a chunk of map (not too large) to
>> download.
>> 3) Start drawing your polygons into "the real fabric of the map,"
>> knowing that you haven't uploaded yet, but you will when all looks OK.
>> 4) After polygons are drawn, you can either select them and choose
>> Create Multipolygon menu item, or create a new polygon from scratch, then
>> select the polygons and add them one-by-one. We didn't go through this, it
>> takes a bit of getting used to and is a bit hard to describe in email,
>> though the web-based tutorial I pointed you to (it isn't video, it is
>> text-on-web-pages) is pretty good. When your multipolygon relation (as
>> described above) is to your liking:
>> A) must have type=multipolygon tag in the "upper pane" of the
>> relation editing window,
>> B) must have at least two polygons,
>> C) each polygon must have the proper role tag
>> then you can
>> 5) Press OK at the bottom of the relation editing window.
>>
>> Now, your edit is "in the buffer" for your examination, verification (I
>> highly recommend a plug-in called Validator...another topic...you'll get
>> there) or further editing. Then, you must upload to the great OSM server
>> in the sky! You do this with the green UP arrow, where you assign a
>> changeset comment and all that.
>>
>> Hooray!
>>
>> So, as your "lake with an island" email just rolled in, I'd say that the
>> lake polygon likely gets tagged outer, the island polygon gets tagged inner
>> and Bob's your uncle. But actually, a lake in an island isn't really a
>> multipolygon, to the best of my knowledge. MPs are usually for thing like
>> "this whole vast area is tagged natural=wood, but there is this little
>> meadow inside of it which is natural=grassland. OK, tag the "big outer"
>> with natural=wood, tag the "little inner" with natural=grassland, make a MP
>> with these two members, put the role tag outer on the big wood, put the
>> role tag inner on the little meadow, make sure there is at least
>> "type=multipolygon" in the top "tags area" of the relation editing window,
>> and now you've made a "big wood with a little meadow" (and it WILL render
>> properly!)
>>
>> Hope that helps, but I'm getting ready for bed, being 18 hours behind you
>> (it's getting on 11 PM Wed. night here in California).
>>
>> G'day, good luck, check out that tutorial, even consider skipping right
>> to the multipolygon section of it.
>>
>> Steve
>>
>> > On Mar 30, 2022, at 10:00 PM, Graeme Fitzpatrick <graemefitz1 at gmail.com>
>> wrote:
>> >
>> > G'day Steve
>> >
>> > Thanks!
>> >
>> > First off, the laptop. This one is actually pretty good, as it was only
>> brand new last November!
>> >
>> > Dell Inspiron 5510, 16GB RAM, Windows 10 Home Ver 21H2.
>> >
>> > & I'm running JOSM Version 18387, Java Version 17.0.2
>> >
>> > (& I hope that means a lot more to you than it does to me! To quote the
>> man "I don't know what makes 'em work, I just use 'em")
>> >
>> > I've been playing with it for a few weeks & I'm pretty happy with most
>> of the basics (although I still think iD is a lot friendlier!), & have got
>> a couple of multi's to work, but I don't know how as I can't do it again!
>> >
>> > I'm playing with a test at the moment, have drawn the outer & inner,
>> selected them both, then created the multipolygon.
>> >
>> > Over at the right, I've got Tags: 1 / Memberships: 0
>> > Relations/Multipoygon ...
>> > type=multipolygon
>> >
>> > Sel.: Rel.: 1 / Ways:0 / Nodes:0
>> > multipolygon (0. 2 members)
>> >
>> > Relations:
>> > multipolygon (0. 2 members)
>> >
>> > Ok, what next?
>> >
>> > Thanks
>> >
>> > Graeme
>> >
>> >
>> > On Thu, 31 Mar 2022 at 13:50, stevea <steveaOSM at softworkers.com> wrote:
>> > Hi Graeme:
>> >
>> > Off-list. First, it's technically impossible to run JOSM without Java
>> being installed: the J in JOSM stands for Java. It simply won't run
>> without it. So if you ARE running JOSM, you have SOME version of Java
>> installed.
>> >
>> > Next, let's assure some basics: that you've got the necessary hardware
>> and software. What version of Windows, what version of Java? If you don't
>> know you are running "Version 8, Update 321" then use this link:
>> >
>> > https://www.java.com/download/ie_manual.jsp
>> >
>> > to go get it. It's a very brief (2+ MB) download that shouldn't take
>> more than a few seconds, although the associated installation process
>> (initial or to update) will be longer, but no more than a minute or three
>> (at most). Unless you are on "wheezy old hardware," and that may be the
>> case, given how hard you seem to disparage that poor, old laptop of yours!
>> >
>> > Those are basics you might do with me anyway. But even though that
>> might seem superfluous, after choosing "Create Multipolygon," you'll note
>> in the right-side of "panes," — press the Tab key to see these appear and
>> disappear — (the one that shows Sel, Rel, Ways, Nodes with numbers after
>> some of them), a new item has appeared: your multipolygon (mp). Adding
>> tags is done in the "Tags/memberships" pane. You can add a tag (or tags)
>> to the whole of a mp there (make sure it's selected first, then use the +
>> key to add a new tag/key-value pair). And you'll need to add members to an
>> mp with the "relation editor," which is get-at-able by double-clicking the
>> mp in the "Relations" pane.
>> >
>> > The resulting "mp editor" dialog (a new window) has three panes: upper
>> is the key-value pairs that make up the tags on the whole mp. Lower-left
>> are the members of the mp (empty for now, if you double-clicked the new,
>> empty one you just created) and lower-right is the "current selection."
>> The buttons in between lower-left and lower-right move between the
>> selection and the memberships. The buttons off to the far left rearrange,
>> delete, sort and download (from the server, if you've only got "part" of an
>> mp, where you haven't the entire membership, but only SOME members) the
>> members. You'll need to "confirm your changes" to the mp you've edited
>> (tags or its members or both) with the OK button at the bottom of the mp
>> editor dialog window.
>> >
>> > That's a very quick primer, there are good video tutorials (try
>> https://learnosm.org/en/josm/start-josm), but this is a pretty steep
>> curve. Give yourself an entire weekend (a couple of days) to get the
>> basics of JOSM down: creating nodes and ways, moving them around,
>> splitting them, selecting them, turning them into closed ways to form a
>> polygon, uploading your changes with the green up-arrow...those sorts of
>> basics you may be familiar with from iD or other simpler editors, THEN get
>> into relations, as they are a more advanced animal than simple nodes and
>> ways. But I agree that using JOSM for its supreme relation editor is THE
>> way to go to best edit relations.
>> >
>> > I'm here for you, man!
>> >
>> > Steve
>> >
>> > > On Mar 30, 2022, at 8:18 PM, Graeme Fitzpatrick <
>> graemefitz1 at gmail.com> wrote:
>> > >
>> > > I meant to add that I can start OK:
>> > > Draw the outer box,
>> > > draw the inner box,
>> > > select them both,
>> > > click on "Create multipolygon" ...
>> > > but that's where I hit trouble!
>> > >
>> > > How do you add tags etc?
>> > >
>> > > Thanks
>> > >
>> > > Graeme
>> > >
>> > >
>> > > On Thu, 31 Mar 2022 at 13:15, Graeme Fitzpatrick <
>> graemefitz1 at gmail.com> wrote:
>> > > Does anybody know of a simple, straight-forward, how-to for creating
>> multipolygons using JOSM?
>> > >
>> > > If possible, I'd prefer a document rather than video, but beggars
>> can't be choosers!
>> > >
>> > > I've already found a couple, but they either don't explain how-to, or
>> I get different results when I do what they say?
>> > >
>> > > That "could" be because I'm using JOSM for Windows? (Have to as no
>> Java on my laptop!)
>> > >
>> > > Thanks
>> > >
>> > > Graeme
>> > > _______________________________________________
>> > > Talk-au mailing list
>> > > Talk-au at openstreetmap.org
>> > > https://lists.openstreetmap.org/listinfo/talk-au
>> >
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-au/attachments/20220408/96e57633/attachment-0001.htm>
More information about the Talk-au
mailing list