[Talk-ca] FW: Sharing Your Data on OpenStreetMap - It's All About Data - Safe Software Blog

2010-03-18 Thread Bégin , Daniel
Hi guys,
 
here is excellent news for Openstreetmap community.  Main data providers have 
now a tool to create something like the future Canvec.osm product - If they 
have the interest and the proper licence!
 
Daniel



From: noreply+feedpr...@google.com [mailto:noreply+feedpr...@google.com] On 
Behalf Of It's All About Data
Sent: 18 mars 2010 12:16
To: Bégin, Daniel
Subject: Sharing Your Data on OpenStreetMap - It's All About Data - Safe 
Software Blog



Sharing Your Data on OpenStreetMap - It's All About Data - Safe Software Blog 
  
 

 

Link to It's All About Data   


Sharing Your Data on OpenStreetMap 

  

Posted: 17 Mar 2010 04:36 PM PDT

It's true. Getting data into OpenStreetMap   can, at times, be 
difficult. 

Now don't get me wrong, there are some great applications out there for pulling 
data   off 
  your GPS, or tracing Yahoo 
imagery   or adding your favourite 
coffee shop   as a POI from your iPhone 
 . But, what if your 
organization has building footprints in Darwin Glacier Lambert Conformal 2000 
  for an entire city in Oracle 
Spatial and you want to put that data into OSM?

I have written in the past 
  about using data from 
OpenStreetMap in your FME workspaces as a data source, and so I was happy when 
we recently added   a very 
early stage writer to compliment the reader. So what does this new OSM writer 
mean? Well, if you've got some data you would like to share with the OSM 
community, you can write it to OSM XML just like you could with any other 
format supported   by 
FME. If you want to load your city's   
public   data   into OSM you can 
use FME to create OSM XML from that data. (Note, make sure the license of data 
you don't own allows this, just because it's public doesn't mean it can legally 
be loaded into OSM. Read and understand the terms and conditions)

To use this writer you will need to be running an FME 2011 beta 
 . It is still in a somewhat early stage of development, 
but will improve as time goes on, and become easier to use.

So if you use OSM data, and you have something to share, why not give back to 
the community by loading it into OSM? Download an FME 2011 beta 
  and let us know what you think. If you're not a current 
FME customer, feel free to sign up for our evaluation program 
  for a 14 day trial. Once you get 
your trial license, you can download the beta and be up and running with our 
OSM writer. We're always open to comments and suggestions! 
 

 FME Loves OSM 

 

 
You are subscribed to email updates from It's All About Data 
  
To stop receiving these emails, you may unsubscribe now 

 .  Email delivery powered by Google   
Google Inc., 20 West Kinzie, Chicago IL USA 60610   
___
Talk-ca mailing list
Talk-ca@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] FW: Sharing Your Data on OpenStreetMap - It's All About Data - Safe Software Blog

2010-03-18 Thread Richard Weait
On Thu, Mar 18, 2010 at 12:49 PM, Bégin, Daniel <
daniel.be...@rncan-nrcan.gc.ca> wrote:

>  Hi guys,
>
> here is excellent news for Openstreetmap community.  Main data providers
> have now a tool to create something like the future Canvec.osm product - If
> they have the interest and the proper licence!
>


Nice to see interest in OSM from proprietary software vendors.  I've
forwarded this info to http://opengeodata.org/
___
Talk-ca mailing list
Talk-ca@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-ca


Re: [Talk-ca] call for help, importing roads

2010-03-18 Thread Adam Dunn
So far, I've got the LL_Roads2 files imported in PostgreSQL, and I've
written some functions to export them (modified from the NRN process on
wiki), but it's not working properly. Using pgAdmin on Linux, I can see what
data values there are, and their types:
gid serial NOT NULL,
id numeric,
"type" character varying(50),
category smallint,
cat2 smallint,
shape_leng numeric,
"name" character varying(30),
shape_le_1 numeric,
et_id integer,
the_geom geometry,

When I export this to shp and open in OpenJUMP, I can see that some of the
values aren't getting exported properly. gid doesn't seem to be exported at
all. id, type, shape_leng, shape_le_1, and the_geom all seem to be fine.
Unfortunately, category, cat2, and et_id are all coming up with the value 0,
even though they had other values in the original dataset. Name I can't
test, since it seems to be null in the original data.
Here's the function I'm using:


DROP TYPE albania_gov_data;
CREATE TYPE albania_gov_data AS (
  --Included all Albanian keys, since I don't know what they mean/which are
important
gid integer,
the_geom geometry,
id numeric,
way_type text,
category smallint,
cat2 smallint,
shape_leng numeric,
way_name text,
shape_le_1 numeric,
et_id integer

);
CREATE OR REPLACE FUNCTION select_albania_gov_roadtile(coordinates text)
RETURNS SETOF albania_gov_data
AS $$
SELECT gid,ST_Transform(the_geom,4326),id,"type", --might need 4191
rather than 4326
category,cat2,shape_leng,"name",shape_le_1,et_id FROM
albania_roadseg
WHERE
  ST_Intersects(ST_Transform(the_geom,4326),
  ST_GeomFromEWKT($1))


$$
LANGUAGE SQL;

CREATE TYPE albania_osm_data AS (
way geometry,
osm_id integer,
name text
);

CREATE OR REPLACE FUNCTION select_albania_osm_roadtile(coordinates text)
RETURNS SETOF albania_osm_data
AS $$
SELECT ST_Transform(way,4326),osm_id,substr(name,0,80) --might need 4191
rather than 4326
FROM planet_osm_line WHERE
ST_Intersects(way,ST_GeomFromEWKT($1))
 AND ((highway is not null)
   OR (railway is not null)) --Albania appears to have railways
in gov_data
$$
LANGUAGE SQL;


Anybody got any ideas?

On the data itself:
What is the difference between all the files on the ftp? There is LL_Roads,
LL_Roads2, LL_Roads_OSM, but a quick check in OpenJUMP, and they all look
the same.
For my test, I exported an area around Gjirokastra [
http://www.openstreetmap.org/index.html?minlat=40&minlon=20&maxlat=40.2&maxlon=20.2&box=yes&layers=B000FTF].
In this area, the id tag was only partially useful: In downtown Gjirokastra
(the densely roaded area that is not currently visible on OSM, but is approx
bounded by [http://www.openstreetmap.org/browse/way/30455602] and [
http://www.openstreetmap.org/browse/way/36777258]) the id tag seemed to be
missing for roads. The id tag was only available in the outer (rural?)
areas. Shape_leng was mostly 0.0, except for about 20 roads at the south end
of Gjirokastra (out of 2479 roads), in which case it matched up with
shape_le_1. This data also includes Footpath as a type, along with the other
types I mentioned in my last email. A listing of all the different
ways/types/categories in this data would be nice to have.

The data is missing a gml file. This is necessary to run the geobase2osm.py
step. You could probably use ogr2ogr to do it, but you'd need proper id or
et_id, whichever would work better as a unique identifier (probably not id,
since it's not available in urban areas!).

I did get both the OSM data and the (I assume) government data into openjump
roadmatcher, so it would be possible to roadmatch with what I have, but not
very useful.

Adam

On Wed, Mar 17, 2010 at 2:47 PM, Adam Dunn  wrote:
>
> Hi, I was kind of hoping someone more knowledgeable in GIS programming
would've responded first for the following reasons: geobase2osm.py is an
integral part of the whole roadmatching process for Canada, and it's a very
Canadian-specific script (there are chunks of code that deal with naming of
major trunks on a province-by-province basis using if-else programming).
>
> Also, I don't have much experience programming GIS stuff. For example, the
Canadian way of doing this uses EPSG 3348 for projection [1]. I did some
Google searching, and it looks like you would want to use EPSG 4191 for the
Albania area (see [2]), but 2462 might also the one you want to use ([3],
although it looks like you get weird projected bounds with it). I don't know
why this reprojection is really even necessary. When you look at EPSG 3348
(the Canadian one), the projected bounds are really weird there as well, so
maybe it has to be done just to match up with NRN. If the Albania dataset is
already in Lat/Long and 4191 is in Lat/Long and OSM is in Lat/Long, maybe
you don't need to reproject at all? Someone with more GIS knowledge should
know.
>
> You'll also want a script to automatically convert

Re: [Talk-ca] call for help, importing roads

2010-03-18 Thread jamesmikedup...@googlemail.com
The roads shp files  are all the same,, that is true.


On Thu, Mar 18, 2010 at 9:19 PM, Adam Dunn  wrote:

> So far, I've got the LL_Roads2 files imported in PostgreSQL, and I've
> written some functions to export them (modified from the NRN process on
> wiki), but it's not working properly. Using pgAdmin on Linux, I can see what
> data values there are, and their types:
> gid serial NOT NULL,
> id numeric,
> "type" character varying(50),
> category smallint,
> cat2 smallint,
> shape_leng numeric,
> "name" character varying(30),
> shape_le_1 numeric,
> et_id integer,
> the_geom geometry,
>
> When I export this to shp and open in OpenJUMP, I can see that some of the
> values aren't getting exported properly. gid doesn't seem to be exported at
> all. id, type, shape_leng, shape_le_1, and the_geom all seem to be fine.
> Unfortunately, category, cat2, and et_id are all coming up with the value 0,
> even though they had other values in the original dataset. Name I can't
> test, since it seems to be null in the original data.
> Here's the function I'm using:
>
>
> DROP TYPE albania_gov_data;
> CREATE TYPE albania_gov_data AS (
>   --Included all Albanian keys, since I don't know what they mean/which are
> important
> gid integer,
> the_geom geometry,
> id numeric,
> way_type text,
> category smallint,
> cat2 smallint,
> shape_leng numeric,
> way_name text,
> shape_le_1 numeric,
> et_id integer
>
> );
> CREATE OR REPLACE FUNCTION select_albania_gov_roadtile(coordinates text)
> RETURNS SETOF albania_gov_data
> AS $$
> SELECT gid,ST_Transform(the_geom,4326),id,"type", --might need 4191
> rather than 4326
> category,cat2,shape_leng,"name",shape_le_1,et_id FROM
> albania_roadseg
> WHERE
>   ST_Intersects(ST_Transform(the_geom,4326),
>   ST_GeomFromEWKT($1))
>
>
> $$
> LANGUAGE SQL;
>
> CREATE TYPE albania_osm_data AS (
> way geometry,
> osm_id integer,
> name text
> );
>
> CREATE OR REPLACE FUNCTION select_albania_osm_roadtile(coordinates text)
> RETURNS SETOF albania_osm_data
> AS $$
> SELECT ST_Transform(way,4326),osm_id,substr(name,0,80) --might need
> 4191 rather than 4326
> FROM planet_osm_line WHERE
> ST_Intersects(way,ST_GeomFromEWKT($1))
>  AND ((highway is not null)
>OR (railway is not null)) --Albania appears to have railways
> in gov_data
> $$
> LANGUAGE SQL;
>
>
> Anybody got any ideas?
>
But the shapes are working?


>
> On the data itself:
> What is the difference between all the files on the ftp? There is LL_Roads,
> LL_Roads2, LL_Roads_OSM, but a quick check in OpenJUMP, and they all look
> the same.
>

no difference


> For my test, I exported an area around Gjirokastra [
> http://www.openstreetmap.org/index.html?minlat=40&minlon=20&maxlat=40.2&maxlon=20.2&box=yes&layers=B000FTF].
> In this area, the id tag was only partially useful: In downtown Gjirokastra
> (the densely roaded area that is not currently visible on OSM, but is approx
> bounded by [http://www.openstreetmap.org/browse/way/30455602] and [
> http://www.openstreetmap.org/browse/way/36777258]) the id tag seemed to be
> missing for roads. The id tag was only available in the outer (rural?)
> areas. Shape_leng was mostly 0.0, except for about 20 roads at the south end
> of Gjirokastra (out of 2479 roads), in which case it matched up with
> shape_le_1. This data also includes Footpath as a type, along with the other
> types I mentioned in my last email. A listing of all the different
> ways/types/categories in this data would be nice to have.
>

I can tag them afterwards.
I have a tag tool as well to do a report.
the most important thing is to get rid of the duplicates



>
> The data is missing a gml file. This is necessary to run the geobase2osm.py
> step. You could probably use ogr2ogr to do it, but you'd need proper id or
> et_id, whichever would work better as a unique identifier (probably not id,
> since it's not available in urban areas!).
>

hmmm...

>
> I did get both the OSM data and the (I assume) government data into
> openjump roadmatcher, so it would be possible to roadmatch with what I have,
> but not very useful.
>

why not?
thank you for your efforts to you irc? come to irc.freenode.net #flossk or
add me on skype : h4ck3rm1k3

thanks,
mike


>
> Adam
>
>
> On Wed, Mar 17, 2010 at 2:47 PM, Adam Dunn  wrote:
> >
> > Hi, I was kind of hoping someone more knowledgeable in GIS programming
> would've responded first for the following reasons: geobase2osm.py is an
> integral part of the whole roadmatching process for Canada, and it's a very
> Canadian-specific script (there are chunks of code that deal with naming of
> major trunks on a province-by-province basis using if-else programming).
> >
> > Also, I don't have much experience programming GIS stuff. For example,
> the Canadian way of doing this uses EPSG 3348 for projection [1]. I did some
> Google sea

Re: [Talk-ca] call for help, importing roads

2010-03-18 Thread Adam Dunn
The reason why it is functionally useless at this point is because the
id/et_id is not being transferred through the process correctly. Perhaps an
explanation of the process is in order:
The SQL stage is basically for reprojection and selecting a bounding box. If
you already had both the government and the OSM roads converted into a
Shapefile format, and they both had the same projection, and you were
willing to work on the entire country at the same time, then you wouldn't
even need SQL. You generally don't want to do the whole country at a time
(trust me, it's not something you do in OpenJUMP), and you generally need to
do some reprojection/format conversion, so we need SQL. What gets spit out
of the SQL step is two files, OSM.shp and GOV.shp, and they each have
geometry (where the roads are) and id numbers (internal numbers used by
each).
These two files get loaded into OpenJUMP Roadmatcher, where you find the
matches, find the standalones, then output the result. This result file has
a list of the id numbers for the roads that are standalone in the government
database.
Then (for Canada) geobase2osm.py will use the Roadmatcher result file as a
mask to see which roads to copy from the government gml file over to an osm
file. It does this by looking at the standalone id numbers, and then copying
only the roads in the gml that have those ids.
I kind of think of it like a transistor. A transistor takes some voltage
input and connects it to the output, depending on whether the gate voltage
is on or not. The input/output voltages can be large or small, but the gate
voltage only needs to be tiny. The gate voltage itself doesn't get passed
through to the output. Something like this:
   gate
 |
input -- transistor -- output

Equivalently, geobase2osm.py connects the Government.gml geometry to the
Standalone.osm geometry, but only if the Standalone Result ID is on. The
Result ID itself doesn't get passed through, it's only used as a gate mask.
So we get something like:
 Result ID#
   |
GovGeometry.gml -- geobase2osm.py -- StandaloneGeometry.osm

Since I haven't yet gotten the ID numbers to pass through, we can't use them
as a mask for geobase2osm.py, rendering it useless. We can't generate osm
files that have no duplicates with what's already on OSM.

Let's say you want to do things more manually. You could run the match
process in Roadmatcher, then visually look and see what roads need to be
copied over, then go over to JOSM and manually pick out those roads. This is
silly, as you could do this faster by skipping Roadmatcher, and just
matching by eye within JOSM.

Even if I do get ID numbers to transfer through, I don't know how portable
geobase2osm.py will be to the Albanian data. What tools have other imports
used? Maybe there's something else that uses a slightly different method?

Adam

On Thu, Mar 18, 2010 at 1:38 PM, jamesmikedup...@googlemail.com <
jamesmikedup...@googlemail.com> wrote:

>
> The roads shp files  are all the same,, that is true.
>
>
> On Thu, Mar 18, 2010 at 9:19 PM, Adam Dunn  wrote:
>
>> So far, I've got the LL_Roads2 files imported in PostgreSQL, and I've
>> written some functions to export them (modified from the NRN process on
>> wiki), but it's not working properly. Using pgAdmin on Linux, I can see what
>> data values there are, and their types:
>> gid serial NOT NULL,
>> id numeric,
>> "type" character varying(50),
>> category smallint,
>> cat2 smallint,
>> shape_leng numeric,
>> "name" character varying(30),
>> shape_le_1 numeric,
>> et_id integer,
>> the_geom geometry,
>>
>> When I export this to shp and open in OpenJUMP, I can see that some of the
>> values aren't getting exported properly. gid doesn't seem to be exported at
>> all. id, type, shape_leng, shape_le_1, and the_geom all seem to be fine.
>> Unfortunately, category, cat2, and et_id are all coming up with the value 0,
>> even though they had other values in the original dataset. Name I can't
>> test, since it seems to be null in the original data.
>> Here's the function I'm using:
>>
>>
>> DROP TYPE albania_gov_data;
>> CREATE TYPE albania_gov_data AS (
>>   --Included all Albanian keys, since I don't know what they mean/which
>> are important
>> gid integer,
>> the_geom geometry,
>> id numeric,
>> way_type text,
>> category smallint,
>> cat2 smallint,
>> shape_leng numeric,
>> way_name text,
>> shape_le_1 numeric,
>> et_id integer
>>
>> );
>> CREATE OR REPLACE FUNCTION select_albania_gov_roadtile(coordinates text)
>> RETURNS SETOF albania_gov_data
>> AS $$
>> SELECT gid,ST_Transform(the_geom,4326),id,"type", --might need 4191
>> rather than 4326
>> category,cat2,shape_leng,"name",shape_le_1,et_id FROM
>> albania_roadseg
>> WHERE
>>   ST_Intersects(ST_Transform(the_geom,4326),
>>   ST_GeomFromEWKT($1))
>>
>>
>>

[Talk-ca] distribution of free mixed media (was Fwd: Trail Challenge 2010 Launch - Trails BC)

2010-03-18 Thread Sam Vekemans
Hi Andy, & talk-ca list,

(Since your the author of the cyclemap, perhaps you've run across this
situation already?)

I'm forwarding this announcement ... more to talk about mapping :)  ... and
if anyone is interested in going, please mark your calendars :)

It was originally an attachment, so i made it into a Google Docs view.
(probably archive.org would be better)
http://docs.google.com/fileview?id=0B270fsptsPF2NWM3MzQ4ZTItYWRhYi00N2I5LWI4MTctMTIyNWVhNGIzODJh&hl=en

Here's what i did.  Perhaps others can help more?


-- Forwarded message --
From: Sam Vekemans 
Date: Thu, Mar 18, 2010 at 7:18 PM
Subject: Re: Trail Challenge 2010 Launch - Trails BC
To: Léon Lebrun - Trails BC 


Here's the 1st one.   Published on wikloc.com
http://www.wikiloc.com/wikiloc/view.do?id=789193
(select 'more maps' and 'OpencycleMap')

And here's the view on Google Earth
http://picasaweb.google.com/lh/photo/WcOYaNkVMLA_Nirj9qN2uA?feat=directlink

And here's the vertical profile of it.
http://picasaweb.google.com/lh/photo/qPOp7A_tjhfGpNLH3W_bFQ?feat=directlink

secrets:
*You can get the CycleMap overlay to google earth here
http://www.mgmaps.com/kml/
>>> *maps.kml * <<< (gets the standard
views)
*Hide all the other Google Earth Layers
* the middle button on the mouse & pull back lets you view in 3d
* Show the 'terrain' layer
*after the route is uploaded to wikiloc, you can download the route as a GPX
& split into segments of 500 points each, then you can open up the .gpx file
in MapSource & see the elevation
* You can download the point of interest (that are in OpenStreetMap) here
http://www.jrq.ch/osmpoi/
(that's the little tree icon close to Pojo's that you see on the map)

... I have been to Pojo's when i was on my cycling trip across western
Canada... good fries.   And the place isn't yet listed on OpenStreetMap. ...
that should be fixed. ...(I'll mention it to the mappers in the area)

Let me know if that's fine, then i'll do the other 4 the same way.

Cheers,
Sam


**


-- Forwarded message --
From: Léon Lebrun - Trails BC 
Date: Thu, Mar 18, 2010 at 2:40 PM
Subject: Trail Challenge 2010 Launch - Trails BC
To: samvekem...@gmail.com


 list for Trails BC events please reply to this email by requesting; "Please
delete me from this list."


*Metro Trail Loop Cycle Challenges 2010
Five Golden Rings

*

*This year we are replacing our regular Trans Canada Trail (TCT)  Challenges
with five superb trail loop cycling challenges in the Metro Vancouver area.
Similar walking challenges are being considered for another year.  The loops
include existing TCT and future alternate routes for the TCT.*

*We cancelled a planned TCT Challenge from Tsawwassen to Fort Langley due to
new trail construction that will not be completed in time.*

*For more information see attachment.*

*There will be a limit of 40 participants per group. Deadline for
registration is April 20 or when all the groups are full.*
_
Léon Lebrun
Vice-President
& Southwest Regional Director
Trails BC
www.trailsbc.ca
southw...@trailsbc.ca
604-942-6768



Here's what i know is true about OpenCycleMap
- we cant map the routes like this since the overall route does not exist
... BUT we can map 'proposed cycle network connections'.  That is, after we
know that we have mapped all of the existing cycle network (local &
regional) available.
- ideally (instead of wikiloc) we should be using
http://www.cyclestreets.net/journey/  since it's OSM by default. (and
OpenSource i think)
- bikemap.net is also good, as it uses cyclemap, and has a bit more
fetaures.

Google Earth: ... i know that this is a sensitive issue. ... the
Organization that is using this route is TrailsBC (a non-profit).  They
provide the map as information, & dont charge for it.
There is a fee for the ride as it is an organized group event. (a way to
support the Non-profit, so they stay afloat.   Just as OSM Foundation hosts
fund-raising drives.   (I don't ask why, i just volunteered to try to make a
nicer looking map)
The attribution is present (on my Picasa View of the map),   so i dont see a
problem with promoting the kml (OSM overlay)

The google earth licence (AFAIK) says that you cant print it in a Book &
sell it.   But the OSM licence says that you are aloud (but not using google
earth AND provided that you give attribution)
   just like how the map is shown in the Times Atlas of the World (as an
example in the beginning part of the book)  ... (and is shown in the
wikiTravel Books also.)

Ideally, all of the waypoints that were used, should come directly from
OpenStreetMap (that OSM POI overlay).   But because OpenStreetMap is not yet
complete (the restaurant "Pojo's" is not in OSM) it makes it hard to fully
use OSM.

Anyway, to expand on this further (for other uses).  I dont see anything
wrong with me creating a free tourist map (where no money is exchanged
hands)   So an example like this
 http: