Re: [Talk-ca] Any way to dirty large areas of Mapnik?

2010-08-10 Thread G. Michael Carter




Play with this:

#!/usr/bin/python
from math import pi,cos,sin,log,exp,atan,ceil,floor,radians,tan
from subprocess import call
import sys, os
from Queue import Queue
import mapnik
import threading

def deg2num(lat_deg, lon_deg, zoom):
 lat_rad = radians(lat_deg)
 n = 2.0 ** zoom
 xtile = int((lon_deg + 180.0) / 360.0 * n)
 ytile = int((1.0 - log(tan(lat_rad) + (1 / cos(lat_rad))) / pi) /
2.0 * n)
 return(xtile, ytile)


def minmax (a,b,c):
 a = max(a,b)
 a = min(a,c)
 return a

def dirty_tiles(bbox):
 for z in range(5,18):
 str_z = "%s" % z
 px0 = deg2num(bbox[1], bbox[0], z)
 px1 = deg2num(bbox[3], bbox[2], z)
 #print px0, px1

 for x in range(int(px0[0]),int(px1[0])+1):
 str_x = "%s" % x
 for y in range(int(px0[1]),int(px1[1])+1):
 str_y = "%s" % y
 dirty_uri = 'curl http://b.tile.openstreetmap.org/' +
str_z + '/' + str_x + '/' + str_y + '.png/dirty; sleep 2;'
 print dirty_uri


if __name__ == "__main__":
 home = "."

#-
 #
 # Change the following for different bounding boxes and zoom levels
 #
 # Start with an overview

# if sys.argv[0] is None:
# print "usage dirty.py: tilename max_lat max_lon min_lat
min_lon"
# exit


 bbox =
(float(sys.argv[2]),float(sys.argv[3]),float(sys.argv[4]),float(sys.argv[5]))
# bbox = (-87.0,49.0,-82.0,45.0)
# bbox = (-81.0,52.0,-70.0,38.0)
 print "#",sys.argv[1],":",bbox
 
 dirty_tiles(bbox)



On 08/08/10 08:26 PM, Tyler Gunn wrote:

  
Is there any easy way to "dirty" large areas of the Mapnik map at all zoom
levels?  I'm working on the 062N* tiles in Canvec and there's a fair number
of tiles at different zoom levels that are not properly refreshed:

For example:
http://www.openstreetmap.org/?lat=51.529lon=-100.42zoom=9layers=M
http://www.openstreetmap.org/?lat=51.547lon=-101.033zoom=10layers=M
http://www.openstreetmap.org/?lat=51.564lon=-101.206zoom=11layers=M

Notice that some areas are fine at some zoom levels where the same areas
are not at other levels.  

I am not about to go and do the whole "/dirty" thing on all the tiles that
are not rendering correctly. :)



  



-- 
G. Michael Carter

Contact: H: 1-519-940-8935 | W: 1-905-267-8494 | M: 1-519-215-1869 | F:
1-519-941-0009 
Google Talk: xmpp:mikeycarter1...@gmail.com






___
Talk-ca mailing list
Talk-ca@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-ca


[Talk-ca] Coastline missing in Lake Superior - in case anyone notices...

2010-08-10 Thread G. Michael Carter
I'm currently working on importing CanVec data around Lake Superior... 
the coast line was really getting in the way, so I'm deleting it.  I'm 
actually joining them to the CanVec water corners... but it's probably 
creating a coastal hole, not really sure if the join is actually working.


My plan is to finish loading all the coastal areas with the canvec 
data.  Then joining the big body of water with a single relation, on the 
Canadian side.   That will become the new coastal waters object, when 
finished.  On the USA side I'll just join the existing coastal waters 
object across the USA/Canada boarder.


I should have the entire lake finished by the end of the week... I 
hope.   I just wanted to post this in case it sent up red flags somewhere.



___
Talk-ca mailing list
Talk-ca@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] Coastline missing in Lake Superior - in case anyone notices...

2010-08-10 Thread Sam Vekemans
what im doing is keeping the coastline in tact, and adding in more
detail as i go along, and merging the nodes with the land/water
features edge as i go along.


you might want to message the talk-us list as you go along.


cheers,
sam

On 8/10/10, G. Michael Carter mi...@carterfamily.ca wrote:
 I'm currently working on importing CanVec data around Lake Superior...
 the coast line was really getting in the way, so I'm deleting it.  I'm
 actually joining them to the CanVec water corners... but it's probably
 creating a coastal hole, not really sure if the join is actually working.

 My plan is to finish loading all the coastal areas with the canvec
 data.  Then joining the big body of water with a single relation, on the
 Canadian side.   That will become the new coastal waters object, when
 finished.  On the USA side I'll just join the existing coastal waters
 object across the USA/Canada boarder.

 I should have the entire lake finished by the end of the week... I
 hope.   I just wanted to post this in case it sent up red flags somewhere.


 ___
 Talk-ca mailing list
 Talk-ca@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/talk-ca



-- 
Twitter: @Acrosscanada
Blogs: http://acrosscanadatrails.posterous.com/
http://Acrosscanadatrails.blogspot.com
Facebook: http://www.facebook.com/sam.vekemans
Skype: samvekemans
IRC: irc://irc.oftc.net #osm-ca Canadian OSM channel (an open chat room)
@Acrosscanadatrails

___
Talk-ca mailing list
Talk-ca@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] Coastline missing in Lake Superior - in case anyone notices...

2010-08-10 Thread G. Michael Carter




I thought of that, but I'm dealing with over a million coastline
objects. Seemed quicker and less prone to screw ups if I just deleted
the object and add natural=coastline to the canvec body of water.
(There's a lot of coastal islands and stuff I'm contending with too...)

Michael

On 10/08/10 02:29 PM, Sam Vekemans wrote:

  what im doing is keeping the coastline in tact, and adding in more
detail as i go along, and merging the nodes with the land/water
features edge as i go along.


you might want to message the talk-us list as you go along.


cheers,
sam

On 8/10/10, G. Michael Carter mi...@carterfamily.ca wrote:
  
  
I'm currently working on importing CanVec data around Lake Superior...
the coast line was really getting in the way, so I'm deleting it.  I'm
actually joining them to the CanVec water corners... but it's probably
creating a coastal hole, not really sure if the join is actually working.

My plan is to finish loading all the coastal areas with the canvec
data.  Then joining the big body of water with a single relation, on the
Canadian side.   That will become the new coastal waters object, when
finished.  On the USA side I'll just join the existing coastal waters
object across the USA/Canada boarder.

I should have the entire lake finished by the end of the week... I
hope.   I just wanted to post this in case it sent up red flags somewhere.


___
Talk-ca mailing list
Talk-ca@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-ca


  
  

  



-- 
G. Michael Carter

Contact: H: 1-519-940-8935 | W: 1-905-267-8494 | M: 1-519-215-1869 | F:
1-519-941-0009 
Google Talk: xmpp:mikeycarter1...@gmail.com






___
Talk-ca mailing list
Talk-ca@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] Coastline missing in Lake Superior - in case anyone notices...

2010-08-10 Thread Sam Vekemans
thanks, i'll try that.
just add in the natural=coastline to the waterbody and reverse the
ways so then its correct.
... but also adding in the coastal line along the areas that have a
smaller natural=water polygon.


so it's still a slow  steady process, no matter how it's mixed :) ...
as long as the end result is the same, it's all good.


cheers,
sam

On 8/10/10, G. Michael Carter mi...@carterfamily.ca wrote:
 I thought of that, but I'm dealing with over a million coastline
 objects.   Seemed quicker and less prone to screw ups if I just deleted
 the object and add natural=coastline to the canvec body of water.
 (There's a lot of coastal islands and stuff I'm contending with too...)

 Michael

 On 10/08/10 02:29 PM, Sam Vekemans wrote:
 what im doing is keeping the coastline in tact, and adding in more
 detail as i go along, and merging the nodes with the land/water
 features edge as i go along.


 you might want to message the talk-us list as you go along.


 cheers,
 sam

 On 8/10/10, G. Michael Cartermi...@carterfamily.ca  wrote:

 I'm currently working on importing CanVec data around Lake Superior...
 the coast line was really getting in the way, so I'm deleting it.  I'm
 actually joining them to the CanVec water corners... but it's probably
 creating a coastal hole, not really sure if the join is actually working.

 My plan is to finish loading all the coastal areas with the canvec
 data.  Then joining the big body of water with a single relation, on the
 Canadian side.   That will become the new coastal waters object, when
 finished.  On the USA side I'll just join the existing coastal waters
 object across the USA/Canada boarder.

 I should have the entire lake finished by the end of the week... I
 hope.   I just wanted to post this in case it sent up red flags
 somewhere.


 ___
 Talk-ca mailing list
 Talk-ca@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/talk-ca






 --
 *G. Michael Carter*
 Contact: H: 1-519-940-8935 | W: 1-905-267-8494 | M: 1-519-215-1869 | F:
 1-519-941-0009
 Google Talk: xmpp:mikeycarter1...@gmail.com

 http://www.openstreetmap.org/?lat=43.9216lon=-80.105zoom=14layers=B000FTF
 http://livedvd.carterfamily.ca/



-- 
Twitter: @Acrosscanada
Blogs: http://acrosscanadatrails.posterous.com/
http://Acrosscanadatrails.blogspot.com
Facebook: http://www.facebook.com/sam.vekemans
Skype: samvekemans
IRC: irc://irc.oftc.net #osm-ca Canadian OSM channel (an open chat room)
@Acrosscanadatrails

___
Talk-ca mailing list
Talk-ca@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] [OSM-talk] Coastline missing in Lake Superior - in case anyone notices...

2010-08-10 Thread G. Michael Carter
I'm perfectly fine killing the coastal tag from the Canadian side on 
all fresh water lakes... makes more sense to me.   Plus it doesn't 
import very well into my Garmin GPS anyways...   you end up pulling half 
the globe just to get the connecting lines, since it's not a single 
object.


Michael

On 10/08/10 02:52 PM, John Smith wrote:

On 11 August 2010 04:51, Sam Vekemansacrosscanadatra...@gmail.com  wrote:
   


a 'lake' and 'shoreline' are 2 different map features.
 

We don't get the sorts of levels of water as they do in North America
so to me a shoreline is only along the sea shore...

Where as bodies of fresh water are usually lakes (natural=water)...
   



___
Talk-ca mailing list
Talk-ca@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] [OSM-talk] Coastline missing in Lake Superior - in case anyone notices...

2010-08-10 Thread Richard Weait
As Quick Draw McGraw would say, Whoa!  Hold on there Pardners!

Please don't just delete and replace a large international body of
water without TONS of discussion with the affected community first.

There is a very high likelihood that editing an object this large will
break in the middle due to a timeout.  That will make fixing it ever
harder.  And it will all take time which is almost certain to cause a
ruckus, if the affected community is not involved before the problem
occurs.

This in not a race.  There is no deadline or prize for changing inland
seas fastest.

Please reconsider this!

___
Talk-ca mailing list
Talk-ca@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] new brunswick mappers

2010-08-10 Thread Sam Vekemans
cool,
do you plan on submitting your road network updates to nrcan?


the current nrcan road network is probably old, so it would be great
to submit the data upstream  as the process for gettin it to osm,
will be a 6 month lag time.


this way, as your creating your new version of separate data, we
already have a source for the data.


my interpretation of osm-law is different. but if you can act on
behalf of the new brunswick dataset and give direct permission to use
the data directly in osm, it can potentially get into openstreetmap
faster than via. geobase via. canvec.




In the mean time, there are other mappers in the region who are doing
a great job.  but yup, i'll help too.   im currently mapping in a
connected line of tiles directly across the contr  fortunatly, in
the big cities, it will be already done before i get to it.


i do have a timeline (before 2012) to get it done, so i'll do my best
to get at least the basemap for the provincial trail network complete.

sam

On 8/10/10, Connors, Bernie (SNB) bernie.conn...@snb.ca wrote:
 Sam,

   I am in the Fredericton area.  My OSM user name is berniejoconnors 
 and I
 previously did some mapping under berniejconnors.  I have only used
 potlatch and Mapzen so far.  I have been following some of the conversation
 about the CanVec data but I have not looked into the import procedure yet
 for CanVec and JOSM.  There are many wide-open areas on the New Brunswick
 OSM map that can be filled in with the CanVec data.  If you want to assist
 with the OSM data in NB I suggest that you pick a blank area on the map on
 the fringe of the existing data.

   I would really like to see a mapping party in NB but I don't have the 
 time
 or expertise in OSM to organize one.  I also have a bit of a conflict.  I
 work for Service New Brunswick - the lead agency for geomatics in NB.  We
 are currently trying to get a project started to map the NB road network to
 the NRN data model.  If I invest too much time in OSM it could be perceived
 as counterproductive to our New Brunswick Road Network (NBRN) project.

   We are providing a free online mapping tool called the GeoNB Map Viewer
 http://www.snb.ca/geonb/.  Please feel free to use the maps here as a
 reference.  The road data displayed in the GeoNB Map Viewer comes from
 several sources and is not one homogeneous dataset.  *Most* of the data
 displayed in the GeoNB Map Viewer is governed by an unrestricted use data
 agreement: http://geonb.snb.ca/geonb/Agreement_en.pdf

   I have also added the GeoNB map services to arcgis.com.  At arcgis.com 
 you
 can combine the GeoNB map services with the OSM data and do some comparisons
 by using the transparency controls.  Just search for GeoNB at arcgis.com
 and you will find our data.

   I would really like to see some OSM presentations at the upcoming 
 Geomatics
 Atlantic Conference in Fredericton, Oct 28 and 29.  The call for
 presentations has been extended:
 http://www.geomaticsatlantic.com/call-for-papers

 Best regards,
 Bernie.
 --
 Bernie Connors, P.Eng
 Service New Brunswick
 (506) 444-2077
 45°56'25.21N, 66°38'53.65W
 www.snb.ca/geonb/


 -Original Message-
 From: talk-ca-boun...@openstreetmap.org
 [mailto:talk-ca-boun...@openstreetmap.org] On Behalf Of Sam Vekemans
 Sent: Monday, 2010-08-09 06:41
 To: Talk-CA OpenStreetMap
 Subject: [Talk-ca] new brunswick mappers

 hi all,
 i'm just wondering who else out their is working on New Brunswick?
 is there an area of preference that i can help out with?

 i see that there are a few mappers around, and some working remotly.




 cheers,
 sam


 --
 Twitter: @Acrosscanada
 Blogs: http://acrosscanadatrails.posterous.com/
 http://Acrosscanadatrails.blogspot.com
 Facebook: http://www.facebook.com/sam.vekemans
 Skype: samvekemans
 IRC: irc://irc.oftc.net #osm-ca Canadian OSM channel (an open chat room)
 @Acrosscanadatrails

 ___
 Talk-ca mailing list
 Talk-ca@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/talk-ca



-- 
Twitter: @Acrosscanada
Blogs: http://acrosscanadatrails.posterous.com/
http://Acrosscanadatrails.blogspot.com
Facebook: http://www.facebook.com/sam.vekemans
Skype: samvekemans
IRC: irc://irc.oftc.net #osm-ca Canadian OSM channel (an open chat room)
@Acrosscanadatrails

___
Talk-ca mailing list
Talk-ca@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] new brunswick mappers

2010-08-10 Thread Sam Vekemans
Hi Bernie,
I must apologies,  I responded to the message on my mobile  too quick
without reading the message in its entirety.


On Behalf of the OSM Canada community, i'd like to thank you for
providing this data to the OSM community.   From what i can see, with
this data announcement, shows how the Province of New Brunswick, is in
line with todays fast-changing advancements of technology.
(Sometimes so fast that it remains difficult for even the industry to
keep up with this globally changing GeoSpatial  environment.)


(copied from the website)
http://www.snb.ca/e/1000/1000-3/e/1000-3_001_e.asp

Background

Since late 2006, the Government of New Brunswick has been working
toward implementing its renewed vision for geomatics in New Brunswick.
The culmination of this effort is a collaboratively built and
maintained Spatial Data Infrastructure (SDI) for New Brunswick, now
referred to as GeoNB.

Simply put, an SDI is a shared data environment that improves access
to geographic information; however, the GeoNB initiative involves much
more than simply sharing data. It also involves sharing tools,
technology and services (or applications) built as part of, or linked
into, the core infrastructure, along with guiding principles, policies
and data standards.

As one of its main objectives, GeoNB will facilitate the sharing of
geographic data and services among government departments,
non-government organizations, industry, not-for-profit companies,
academia, and the general public. GeoNB will even share the
infrastructure it is built on by making services and applications
available to users. GeoNB will evolve and grow as user needs change
and various components (i.e. data sets, tools, services, partners,
participants, etc.) are added over time.

Although a great deal of work has already been done to lay the
foundation and build a collaborative environment, the release of the
GeoNB Map Viewer is, for many stakeholders, the first tangible
deliverable of the overall GeoNB initiative.




 On 8/10/10, Connors, Bernie (SNB) bernie.conn...@snb.ca wrote:
 Sam,

(snip)
       We are providing a free online mapping tool called the GeoNB Map Viewer
 http://www.snb.ca/geonb/.  Please feel free to use the maps here as a
 reference.  The road data displayed in the GeoNB Map Viewer comes from
 several sources and is not one homogeneous dataset.  *Most* of the data
 displayed in the GeoNB Map Viewer is governed by an unrestricted use data
 agreement: http://geonb.snb.ca/geonb/Agreement_en.pdf

quote from pdf

3. Protection and Acknowledgement of Source
1. Subject to this Agreement, SNB hereby grants to the Licensee a
non-exclusive, fully
paid, royalty-free right and licence to exercise all Intellectual
Property Rights in the
Data. This includes the right to use, incorporate, sublicense (with
further right of
sublicensing), modify, improve, further develop, and distribute the Data; and to
manufacture and / or distribute Derivative Products derived from or
for use with the
Data.

I have also cc'd the legal-t...@openstreetmap.org mailing list, to
ensure that the enterpretation of it is the same as the (already
approved by the OSM Foundation) GeoBase / GeoGratis / StatsCan  data
licences, and has the same intent.

I have created a wiki page for this data  announcement details.

http://wiki.openstreetmap.org/wiki/GeoNB

Work is already underway to analyze this data, and see the exact
details and how it can be added to the map.
 As you already know, there is currently an abundance of  data sources
 (from Natural resources Canada - Geogratis among others), which are
already in progress.   However, as this community is far reaching, and
leverages the multiple talents of many users, im sure that there will
be more involvement locally.

For those in New Brunswick, and are interested in helping out with the
efforts, please add your username to the list.
http://wiki.openstreetmap.org/wiki/Canada:New_Brunswick


       I have also added the GeoNB map services to arcgis.com.  At arcgis.com 
 you
 can combine the GeoNB map services with the OSM data and do some comparisons
 by using the transparency controls.  Just search for GeoNB at arcgis.com
 and you will find our data.

The Wiki page for ArcGIS will be updated (as soon as i can)
http://wiki.openstreetmap.org/wiki/ArcGIS
As i have recieved reviews (screenshots) from the OSM-editor
attachment with the software.  So then those who know how to use
ArcGIS, will be able to work with the data.


       I would really like to see some OSM presentations at the upcoming 
 Geomatics
 Atlantic Conference in Fredericton, Oct 28 and 29.  The call for
 presentations has been extended:
 http://www.geomaticsatlantic.com/call-for-papers

This message is forwarded out to others in the OSM Canada Community,
so i hope that others with experience in OSM will be able to attend.

So again, i apologies for my 1st response, as it was not sent with
care.   And want to thank the
Spatial Data Infrastructure (SDI) 

Re: [Talk-ca] new brunswick mappers

2010-08-10 Thread Richard Weait
On Tue, Aug 10, 2010 at 3:03 PM, Connors, Bernie (SNB)
bernie.conn...@snb.ca wrote:
[ ... ]
        I would really like to see a mapping party in NB but I don't have the 
 time or expertise in OSM to organize one.  I also have a bit of a conflict.  
 I work for Service New Brunswick - the lead agency for geomatics in NB.  We 
 are currently trying to get a project started to map the NB road network to 
 the NRN data model.  If I invest too much time in OSM it could be perceived 
 as counterproductive to our New Brunswick Road Network (NBRN) project.

Hi Bernie!

You might find it worthwhile to facilitate a regular meeting of OSM
enthusiasts without the additional organizational requirements of a
mapping party.  I do this for meetups in Toronto and
Kitchener-Waterloo and my commitment is essentially, pick a time and
place followed by by there and have fun talking about OSM.

The benefit to the OSM community is that only a few will take the time
to organize such an event, but more than a few would be willing to
attend if somebody else organized it.  You are probably saying to
yourself, Well, sure I would go if somebody else est it up.  And
that kind of proves my point!  ;-)  Our meetups vary from energetic
discussions of OSM related details, to a few regulars catching up on
gossip to meeting newcomers and watching them get more enthusiastic as
they edit the map with an experienced OSMer to encourage them.

Really.  You should do this.

        We are providing a free online mapping tool called the GeoNB Map 
 Viewer http://www.snb.ca/geonb/.  Please feel free to use the maps here as a 
 reference.  The road data displayed in the GeoNB Map Viewer comes from 
 several sources and is not one homogeneous dataset.  *Most* of the data 
 displayed in the GeoNB Map Viewer is governed by an unrestricted use data 
 agreement: http://geonb.snb.ca/geonb/Agreement_en.pdf

Well this is mixed news.  Mostly nice. ;-)  The map viewer has very
pretty icons.

I did not see any obvious indication of which data is covered by the
above license. Since you say some is under another license I think it
will be important to know the difference.

The license above is pretty good from a municipal data license point
of view.  Some of it still concerns me.  On one hand 3.1 allows
licensee to relicense and sublicense - that's good.  On the other hand
4.5 requires licensee to license others with the same terms.  To my
layman's eyes those seem contradictory.

Also 4.4 requires indemnifying SNB.  If SNB needs to rely on OSMs
funds to protect NB in a legal battle, there is trouble afoot.  ;-)
Of course, OSM is also licensed under terms like as is and no warranty
as well.

SNBs requirement for attribution seems quite reasonable if SNB is the
sole source of data for a map project.  In OSM things work a little
differently.  We expect, over time, that any portion of the map will
have had many contributors, even if a large area came originally from
a single data donor.  So in OSM we expect attribution to the project
as a whole to satisfy all attribution requirements.  Then further
details can be had (for technically acute observers) by way of history
files, and listings on the wiki.  For example, the disclaimers and
attributions of several data donors are shown here.
http://wiki.openstreetmap.org/wiki/Attribution  The form of this
attribution may change over time as there is a practical limit to the
size of a wiki page, but the attribution and disclaimers should
continue to be available, even if in sub-pages.

Do you think that SNB might agree to allow the inclusion of certain of
their databases into OpenStreetMap under the current and future OSM
licenses and Contributor Terms?  That seems quite a lot to ask but it
is also a way to expose the SNB data to a lot of potential users.

This is rather more license-talk than I had hoped to have tonight.

        I would really like to see some OSM presentations at the upcoming 
 Geomatics Atlantic Conference in Fredericton, Oct 28 and 29.  The call for 
 presentations has been extended:  
 http://www.geomaticsatlantic.com/call-for-papers

I had a look at that but have a pretty busy October lined up.  Do you
have an idea for an OSM topic that the delegates would love to hear?
I did an Intro to OSM talk for GIScience a couple of years ago and it
lead to some interesting discussion afterwards.  Would you like to do
the talk and use some of my material (It's generally cc-by)?

Best regards,
Richard

___
Talk-ca mailing list
Talk-ca@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-ca