island_poly

39 views
Skip to first unread message

Stephen Davis

unread,
Sep 4, 2012, 6:10:25 PM9/4/12
to nzop...@googlegroups.com
I've added a within_linz_layer column to the island_poly layer in the Mainland to handle islands within lakes, rivers, swamps, etc.

If it'd be easier, it's very straightforward to create another layer for them instead.

Hamish

unread,
Sep 4, 2012, 6:22:22 PM9/4/12
to nzop...@googlegroups.com
thanks, this gives us:


within_linz_layer values

* Return to island_poly statistics

Value Frequency
river 57
lake 44
swamp 42
mangrove 10
rapid 3
ice 2
lagoon 1
mud 1
river,rapid 1

(I take it all of the above are within the "_poly" versions of those
layer names)


for the case of non-oceanic coastline islands, I guess we need to look at like:

[natural=]
if( within_linz_layer != NULL ) {
value = 'land';
} else {
value = 'coastline';
}

right?


thanks,
Hamish

Stephen Davis

unread,
Sep 4, 2012, 6:44:26 PM9/4/12
to nzop...@googlegroups.com

thanks, this gives us:


within_linz_layer values

    * Return to island_poly statistics

Value   Frequency
river   57
lake    44
swamp   42
mangrove        10
rapid   3
ice     2
lagoon  1
mud     1
river,rapid     1

(I take it all of the above are within the "_poly" versions of those
layer names)

That's right.


for the case of non-oceanic coastline islands, I guess we need to look at like:

[natural=]
if( within_linz_layer !=  NULL ) {
   value = 'land';
} else {
   value = 'coastline';
}

right?

Something like that, yeah. You'll still want to manually review some, like swamp, mangrove and mud islands, since they can be inland or coastal.

Glen Barnes

unread,
Sep 4, 2012, 10:19:17 PM9/4/12
to nzop...@googlegroups.com


for the case of non-oceanic coastline islands, I guess we need to look at like:

[natural=]
if( within_linz_layer !=  NULL ) {
   value = 'land';
} else {
   value = 'coastline';
}

right?


and also if the the island has a name:

tag: place

if( name !=  NULL ) {
  value=  'island';
}


If the island has a name, it can be tagged with: place=island and name=*

Hamish

unread,
Sep 5, 2012, 1:35:10 AM9/5/12
to nzop...@googlegroups.com
Glen wrote:
>> and also if the the island has a name:
>
> tag: place
>
> if( name != NULL ) {
> value= 'island';
> }
>
> http://wiki.openstreetmap.org/wiki/Island
>
> If the island has a name, it can be tagged with:
> place<http://wiki.openstreetmap.org/wiki/Key:place>
> =*island* and name <http://wiki.openstreetmap.org/wiki/Key:name>=*

already done 5 days ago. :)

http://linz2osm.openstreetmap.org.nz/data_dict/layer/island_poly/tagging/
http://linz2osm.openstreetmap.org.nz/data_dict/layer/island_poly/info/


the reason given for setting it is that islands then get named in the
renderer, but having a name= tag on the island feature seems to do
that already for Mapnik. Maybe that statement had more to do with
Osmarender? shrug. The meaning of the tag is discoverable and implied
by the existing tags + geometry & so IMO it's little a bit redundant
to have it, but I don't really mind it being there..


Hamish B

Hamish

unread,
Sep 5, 2012, 2:50:52 AM9/5/12
to nzop...@googlegroups.com
is there a way to access geometry in the javascript tagging rules?

then we could get all fancy like:

if (geom.area < 1000)
value = 'islet'
else
value = 'island'


?


for some reason it doesn't like 'fields.within_linz_layer != null',
but if(fields.within_linz_layer) works ok? shrug. I also added a new
surrounded_by=fields.within_linz_layer tag in case anyone gets the
idea to do a multi-relation match up later in the game.


I notice in the tagging preview that the biggest items seem to be
sorted first. So for a more digestible island_poly preview it is good
to set the starting feature ID closer to the total number of features
shown on the stats page. Feature 1 can be huge.


thanks,
Hamish B

Glen Barnes

unread,
Sep 5, 2012, 9:39:24 PM9/5/12
to nzop...@googlegroups.com


On Wednesday, 5 September 2012 18:50:53 UTC+12, Hamish wrote:
is there a way to access geometry in the javascript tagging rules?

then we could get all fancy like:

if (geom.area < 1000)
   value = 'islet'
else
  value = 'island'



Meh. just use island. There is no consensus on what an 'islet' even is at the moment. 

Stephen Davis

unread,
Sep 5, 2012, 11:14:48 PM9/5/12
to nzop...@googlegroups.com
On Wed, Sep 5, 2012 at 6:50 PM, Hamish <hamish...@gmail.com> wrote:
is there a way to access geometry in the javascript tagging rules?

then we could get all fancy like:

if (geom.area < 1000)
   value = 'islet'
else
  value = 'island'

I could do that if you need it for something, but I agree with Glen - you don't really get any more information calling the small ones islets.


for some reason it doesn't like 'fields.within_linz_layer != null',
but if(fields.within_linz_layer) works ok? shrug. I also added a new
surrounded_by=fields.within_linz_layer tag in case anyone gets the
idea to do a multi-relation match up later in the game.
 
The error message emailed to me suggested you were using NULL, but in javascript it's null, lowercase.

I think if(fields.within_linz_layer) is better style, though. It can get a bit confusing, since null == undefined, but not ===. I prefer to avoid using == and != in favour of !== and ===.

Hamish

unread,
Sep 6, 2012, 1:21:17 AM9/6/12
to nzop...@googlegroups.com
re. islet, it's not a big deal I was just wondering if the built-in
derived geometry fields were already available if you knew the right
javascript incantation.

everyone happy with the tagging? I did some tests, it all seems to
work as expected:
http://linz2osm.openstreetmap.org.nz/data_dict/layer/island_poly/tagging/


Even with tagging completed, I suggest to hold off on activating this
layer until the North Island coastline import is completed.


Steve:
> The error message emailed to me suggested you were using NULL, but in javascript it's null,
> lowercase.

ah, I didn't know it cared about that.


> I think if(fields.within_linz_layer) is better style, though.

I haven't seen it as much with the new release of the data, but note
that there were quite a few places in the old dataset that were using
"0" for null, often in places where you won't expect to see it. So in
the tagging rules you'll see a lot of if (... != 0) in weird places,
where it was found to be an issue. A common but less surprising
example of that is for elevation of the coastline and lakes equal to
0.


Hamish\0

Stephen Davis

unread,
Sep 6, 2012, 5:38:37 PM9/6/12
to nzop...@googlegroups.com
> I think if(fields.within_linz_layer) is better style, though.

I haven't seen it as much with the new release of the data, but note
that there were quite a few places in the old dataset that were using
"0" for null, often in places where you won't expect to see it. So in
the tagging rules you'll see a lot of if (... != 0) in weird places,
where it was found to be an issue. A common but less surprising
example of that is for elevation of the coastline and lakes equal to
0.

Yes, for better or worse, "fields" represents what's in the database: null if it's NULL, undefined if the column doesn't exist, and 0 or blank or what-have-you if that's what's in the database.

Hamish

unread,
Sep 8, 2012, 10:11:19 PM9/8/12
to nzop...@googlegroups.com
On 9/6/12, Hamish B wrote:
> everyone happy with the tagging? I did some tests, it all seems to
> work as expected:
> http://linz2osm.openstreetmap.org.nz/data_dict/layer/island_poly/tagging/
>
> Even with tagging completed, I suggest to hold off on activating this
> layer until the North Island coastline import is completed.

ok, noted in the web app as tagging ready but waiting for the
coastline to be in place before activating the mainland.


Hamish B

Hamish

unread,
Jan 18, 2013, 8:14:04 PM1/18/13
to nzop...@googlegroups.com
Hi,

in an island_poly workslice yesterday I noticed Steve's fancy point in
polygon field wasn't being respected. Do we need a better compare
against null in the javascript tagging logic, or was it never picked
up as internal in the first place, or..?

http://linz2osm.openstreetmap.org.nz/data_dict/layer/island_poly/tagging/

e.g., the southern most feature in this checkout is an island within a
lake, but is being tagged as coastline:
http://linz2osm.openstreetmap.org.nz/workslices/712/show/


thanks,
Hamish

Hamish

unread,
Jan 19, 2013, 4:35:34 PM1/19/13
to nzop...@googlegroups.com
it may be because the island was within a pond_poly, which wasn't on
the list of things to search inside of?

Hamish B

Stephen Davis

unread,
Jan 20, 2013, 3:54:12 PM1/20/13
to nzop...@googlegroups.com
Not quite. The query checked whether islands were "within" ponds, but I just had a look and the ponds include island-shaped interior holes, rather than overlapping. There are 15 islands like this that I can find, one of which is in Glen's checkout. I'll add a 'within_linz_layer' for these of 'pond' for these.

--
You received this message because you are subscribed to the Google Groups "nzopengis" group.
To post to this group, send email to nzop...@googlegroups.com.
To unsubscribe from this group, send email to nzopengis+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nzopengis?hl=en.




--
Koordinates Ltd.
PO Box 1604, Shortland St, Auckland 1140, New Zealand
Phone +64-9-966 0433 Web http://koordinates.com/

Stephen Davis

unread,
Jan 20, 2013, 4:00:50 PM1/20/13
to nzop...@googlegroups.com
I've checked and this doesn't seem to apply to any other layers.
Reply all
Reply to author
Forward
0 new messages