Re: [osmosis-dev] bounding-polygon dismisses points at +180° longitude

2011-06-14 Thread WanMil
Although I wrote to Brett directly that extending the polygon to 181° 
works I have observed that is works only for osm input but not for pbf 
input.


osmosis --read-pbf file=180.osm.pbf --bounding-polygon file=asia.poly 
--write-xml file=filtered.osm

throws an exception:

SCHWERWIEGEND: Thread for task 1-read-pbf failed
java.lang.IllegalArgumentException: Bound coordinates outside of valid range
at 
org.openstreetmap.osmosis.core.domain.v0_6.Bound.init(Bound.java:72)
at 
org.openstreetmap.osmosis.areafilter.v0_6.PolygonFilter.simpleBoundIn

tersect(PolygonFilter.java:118)
at 
org.openstreetmap.osmosis.areafilter.v0_6.PolygonFilter.process(Polyg

onFilter.java:71)
at 
org.openstreetmap.osmosis.core.container.v0_6.BoundContainer.process(

BoundContainer.java:59)
at 
org.openstreetmap.osmosis.areafilter.v0_6.AreaFilter.process(AreaFilt

er.java:116)
at 
crosby.binary.osmosis.OsmosisBinaryParser.parse(OsmosisBinaryParser.j

ava:245)
at crosby.binary.BinaryParser.handleBlock(BinaryParser.java:64)
at crosby.binary.file.FileBlock.process(FileBlock.java:135)
at 
crosby.binary.file.BlockInputStream.process(BlockInputStream.java:34)


at crosby.binary.osmosis.OsmosisReader.run(OsmosisReader.java:37)
at java.lang.Thread.run(Unknown Source)
14.06.2011 18:56:20 org.openstreetmap.osmosis.core.Osmosis main
SCHWERWIEGEND: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more 
tasks failed

.
at 
org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForComple

tion(Pipeline.java:146)
at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)
at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Laun

cher.java:329)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav

a:239)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La

uncher.java:409)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:

352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:31)


So the pbf parser should be changed.

WanMil


I'm surprised nobody has brought this up before :-)  It's always been a
limitation of the polygon task.

Osmosis uses the Java 2D libraries to do the polygon calculations.
Please read the Definition of insideness in the following link which
explains why you're seeing this issue.
http://download.oracle.com/javase/6/docs/api/java/awt/Shape.html

We have no way of changing the functionality of the inbuilt java
libraries we're stuck with this one.

I wonder if we should even have points existing on both 0 and 180
longitudes in the database given that they're the same location.
Perhaps a number of tools rely on it though.

Can you modify your polygon to extend to 181°?  I don't think I've ever
tried it, but it should work in theory.

On Tue, Jun 14, 2011 at 7:04 AM, WanMil wmgc...@web.de
mailto:wmgc...@web.de wrote:

Hi,

today I tried to cut out the data of asia from a planet file using
the attached asia.poly file.
Osmosis is doing fine with the exception that the points at +180°
longitude are missing.

I created a little test osm file (180.osm) with one node at +180°
and it's removed by the asia.poly polygon.

This is a real problem because there are (a few) points which really
lie on the +180° longitude, e.g.
http://www.openstreetmap.org/__browse/node/1113705746
http://www.openstreetmap.org/browse/node/1113705746

Without this node there are problems to calculate the multipolygon
of the russian country. So there is a specific need for that.

Can you change the osmosis behaviour so that +180° longitude is
supported?

WanMil

___
osmosis-dev mailing list
osmosis-dev@openstreetmap.org mailto:osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev





___
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev


Re: [osmosis-dev] bounding-polygon dismisses points at +180° longitude

2011-06-14 Thread WanMil

Hi,


Although I wrote to Brett directly that extending the polygon to 181°
works I have observed that is works only for osm input but not for pbf
input.

osmosis --read-pbf file=180.osm.pbf --bounding-polygon file=asia.poly
--write-xml file=filtered.osm
throws an exception:

SCHWERWIEGEND: Thread for task 1-read-pbf failed

  [...snip...]
  So the pbf parser should be changed.

I don't think this is a problem in the PBF parser. It just shows up in
the stack trace because in your pipeline, the PBF reader and the poly
filter are in the same thread. The relevant portion of the stack trace is:


java.lang.IllegalArgumentException: Bound coordinates outside of valid
range
at org.openstreetmap.osmosis.core.domain.v0_6.Bound.init(Bound.java:72)
at org.openstreetmap.osmosis.areafilter.v0_6.PolygonFilter.simpleBoundIn
tersect(PolygonFilter.java:118)
at org.openstreetmap.osmosis.areafilter.v0_6.PolygonFilter.process(Polyg
onFilter.java:71)


The Bound class does not or should not really care at this point whether
the data is from PBF or XML or wherever. So if there's a bug, it's
actually in the Bound which has some incorrect argument validation code
or in the PolygonFilter which passes incorrect arguments to the Bound,
not in the PBF reader.

Could you post your extended polygon with 181° here so I can test this?
Because if it works with XML but not with PBF it gets really interesting ;)

Bye
Igor


Hi Igor,

attached you find the modified poly file.
I have to add that I tried the XML reader with my test file whereas the 
PBF reader was tested with the pbf planet dump 
(ftp://ftp5.gwdg.de/pub/misc/openstreetmap/planet.openstreetmap.org/pbf-experimental/planet-latest.osm.pbf 
which I think is dated from June 10th). Maybe that makes a difference?


PBF reading failed with the given exception. XML reading was successful 
and the 180° longitude node was successfully transferred to the filtered 
file.


WanMil



asia
1
   2.617000E+01 8.452666E+01
   1.81E+02 8.438487E+01
   1.81E+02 -6.047430E+00
   1.549109E+02 -1.706773E+01
   1.423600E+02 -1.028527E+01
   1.305624E+02 -1.026417E+01
   1.180968E+02 -1.325060E+01
   1.027800E+02 -1.197537E+01
   6.162511E+01 -9.103512E+00
   5.422892E+01 1.260610E+01
   4.420775E+01 1.167860E+01
   3.978016E+01 1.656855E+01
   3.160401E+01 3.158641E+01
   3.586444E+01 3.629862E+01
   3.655970E+01 3.766439E+01
   4.410530E+01 3.798438E+01
   4.301638E+01 4.127191E+01
   4.128304E+01 4.141274E+01
   3.625000E+01 4.513920E+01
   3.86E+01 4.899000E+01
   3.17E+01 5.204300E+01
   2.617000E+01 5.614300E+01
   2.617000E+01 8.452666E+01
END
2
   -1.682500E+02   7.77E+01
   -1.81E+02   7.77E+01
   -1.81E+02   5.81E+01
   -1.682500E+02   5.81E+01
   -1.682500E+02   7.77E+01
END
END
___
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev


[OSM-dev] Problem With Tirex Render Stack

2011-06-14 Thread Stefan Menzel
Hello everybody,

I'm still trying tos et up a render Stack Postgis-Mapnik-Tirex-Mod_Tile
it is working right now but, I have a problem rendering some Tiles. I
recognized it first time when I tried to render All Tiles for Zoom 0-10.
When I render Tiles (z=6,x=16,y=16) and (z=6,x=32,y=16) for example  I  get
a timed out, when I try to render them together. When I render them
seperatly it works. I was trying to find the Mistake tweaking al litte with
the DB Parameters. It seems as if the HDD is to slow or something like that.
Setting up the Timeout in tirex.conf (20min) did not helped. Each querry
process took already has 1GB Ram but it still don't work. The jobs.log
doesn't give any hints. So what can I do?

 

Best regards

Stefan

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Problem With Tirex Render Stack

2011-06-14 Thread Peter Körner

Am 14.06.2011 17:05, schrieb Stefan Menzel:

Each querry process took already has
1GB Ram but it still don’t work. The jobs.log doesn’t give any hints. So
what can I do?


You could take a look at the pg_stat_activity table:

http://www.question-defense.com/2008/11/12/postgres-table-pg_stat_activity-table-fields-explained

Peter

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


[OSM-dev] Can I get distance across dry land with OpenStreetMap

2011-06-14 Thread Ævar Arnfjörð Bjarmason
I have the following problems I want to solve with OpenStreetMap data:

  * For points A and B, detect if either one is on an island, and that
you therefore can't traverse between them without a swim.

  * For points A and B, get the distance between them by land. E.g. if
A and B are on opposite sites of a fjord.

The routing libraries I've found seem to all assume that I want to
route across roads, whereas for this task all I need is just a
coastline shapfile of the planet. I'd then find out if A and B are on
different coastlines, or the shortest path between them on land.

Is there anything that does this already? I'm fairly sure I could do
some cleverness with PostGIS to find out whether the line between
points A and B crosses the ocean, but what I actually want is the
distance between them sans ocean.

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Can I get distance across dry land with OpenStreetMap

2011-06-14 Thread Josh Doe
I'm not sure if you'll find what you're looking for in use by current
OSM software. You're thinking more about AI pathfinding in video
games:
http://en.wikipedia.org/wiki/Pathfinding

If you find something that ingests OSM data and can do this sort of
routing I'd love to hear about it!
-Josh

On Tue, Jun 14, 2011 at 11:52 AM, Ævar Arnfjörð Bjarmason
ava...@gmail.com wrote:
 I have the following problems I want to solve with OpenStreetMap data:

  * For points A and B, detect if either one is on an island, and that
    you therefore can't traverse between them without a swim.

  * For points A and B, get the distance between them by land. E.g. if
    A and B are on opposite sites of a fjord.

 The routing libraries I've found seem to all assume that I want to
 route across roads, whereas for this task all I need is just a
 coastline shapfile of the planet. I'd then find out if A and B are on
 different coastlines, or the shortest path between them on land.

 Is there anything that does this already? I'm fairly sure I could do
 some cleverness with PostGIS to find out whether the line between
 points A and B crosses the ocean, but what I actually want is the
 distance between them sans ocean.

 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


[OSM-dev] A couple of new Osmosis plugins: osmosis-simplifyways, osmosis-fastused

2011-06-14 Thread Igor Podolskiy

Hi @dev,

for a current project I wrote some Osmosis tasks which were useful to 
me, and as they were more or less generic I thought they might as well 
be useful for others, too. So, without further ado, here they are:


* osmosis-simplifyways
http://github.com/podolsir/osmosis-simplifyways

Provides the --simplify-ways task which is a straightforward 
Ramer-Douglas-Peucker way geometry simplifier.


* osmosis-fastused
http://github.com/podolsir/osmosis-fastused

Provides fast-used-node and fast-used-way tasks which are way faster 
than the standard used-* tasks for some use cases, especially 
restrictive tag-based filtering. The downside is that they are also way 
more complicated to use. Use your judgment (and the documentation) to 
find out whether you want to use them or not.


There is documentation on the github pages and also the precompiled 
versions in the download area. Needless to say, comments, bug reports, 
forks and pull requests are welcome, just use the appropriate github 
features ;)


Have fun with the plugins,
Greetings from Stuttgart,
Igor

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Problem With Tirex Render Stack

2011-06-14 Thread Stefan Menzel
HI Peter,
this shows me the currently working queries. Is there a way to see which
query was not successfully or how much time which query took?

Best regards 

Stefan


-Ursprüngliche Nachricht-
Von: Peter Körner [mailto:osm-li...@mazdermind.de] 
Gesendet: Dienstag, 14. Juni 2011 17:21
An: Stefan Menzel
Cc: dev@openstreetmap.org
Betreff: Re: [OSM-dev] Problem With Tirex Render Stack

Am 14.06.2011 17:05, schrieb Stefan Menzel:
 Each querry process took already has
 1GB Ram but it still don’t work. The jobs.log doesn’t give any hints. So
 what can I do?

You could take a look at the pg_stat_activity table:

http://www.question-defense.com/2008/11/12/postgres-table-pg_stat_activity-t
able-fields-explained

Peter


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Can I get distance across dry land with OpenStreetMap

2011-06-14 Thread Iván Sánchez Ortega
On Martes 14 Junio 2011 17:52:08 Ævar Arnfjörð Bjarmason escribió:
 The routing libraries I've found seem to all assume that I want to
 route across roads, whereas for this task all I need is just a
 coastline shapfile of the planet. I'd then find out if A and B are on
 different coastlines, or the shortest path between them on land.
 
 Is there anything that does this already?

The thing you want is called a navigation mesh. You might want to search for 
libraries to make and transverse them.

Do read:

http://theory.stanford.edu/~amitp/GameProgramming/MapRepresentations.html


Cheers,
-- 
--
Iván Sánchez Ortega i...@sanchezortega.es i...@geonerd.org

http://ivan.sanchezortega.es
Proudly running Debian Linux with 2.6.39-2-amd64 kernel, KDE , and PHP 
5.3.6-11 generating this signature.
Uptime: 21:12:54 up  1:41,  4 users,  load average: 0.68, 0.74, 0.77

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Can I get distance across dry land with OpenStreetMap

2011-06-14 Thread Mayeul Kauffmann
Hi,
You can do it with open source tools with the gdistance package from R.
Start with this:
http://cran.r-project.org/web/packages/gdistance/vignettes/gdistance-vignette.pdf

(from this page:
http://cran.r-project.org/web/packages/gdistance/index.html
)


You can use the QGIS ManageR plugin to import easily geo data into R.
I would do it this way: Take the OSM coastline (you need a polygon).
Rasterize it (0=ocean, 1=earth). Import this into R (use the raster
package). Define a full conductivity for earth and zero conductivity for
water. The rest is straightforward (cf. gdistance-vignette.pdf pp.
12-15).

There is a full example for a very similar application (here, the cost
is related to sloppy terrain, not water; water is simpler as it is
binary).
You can use R alone or with QGIS.
I suggest you read the first 10  pages of one of the Documents with
fewer than 100 pages at http://cran.r-project.org/other-docs.html
It should be enough to understand the gdistance-vignette.pdf

Hope this helps,
Mayeul

Le mardi 14 juin 2011 à 21:13 +0200, Iván Sánchez Ortega a écrit :
 On Martes 14 Junio 2011 17:52:08 Ævar Arnfjörð Bjarmason escribió:
  The routing libraries I've found seem to all assume that I want to
  route across roads, whereas for this task all I need is just a
  coastline shapfile of the planet. I'd then find out if A and B are on
  different coastlines, or the shortest path between them on land.
  
  Is there anything that does this already?
 
 The thing you want is called a navigation mesh. You might want to search 
 for 
 libraries to make and transverse them.
 
 Do read:
 
 http://theory.stanford.edu/~amitp/GameProgramming/MapRepresentations.html
 
 
 Cheers,



___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Can I get distance across dry land with OpenStreetMap

2011-06-14 Thread Andy Allan
On Tue, Jun 14, 2011 at 4:52 PM, Ævar Arnfjörð Bjarmason
ava...@gmail.com wrote:

 The routing libraries I've found seem to all assume that I want to
 route across roads, whereas for this task all I need is just a
 coastline shapfile of the planet.

You might want to include bridges, too :-)

Cheers,
Andy

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


[OSM-dev] Can we have higher resolution tiles?

2011-06-14 Thread Parveen Arora
Hello Everyone,
I want to know that can we produce higher resolution tiles for a tile
server, means a resolution bit more than of default produced tiles.
Please let me know the procedure of it, If any available?

--
Parveen Arora
www.parveenarora.in
E-Mail: o...@parveenarora.in

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Can we have higher resolution tiles?

2011-06-14 Thread Parveen Arora
On Wed, Jun 15, 2011 at 9:13 AM, Mike  Dupont
jamesmikedup...@googlemail.com wrote:
 yes you can http://www.archive.org/download/SharedMap2/index.html here john
 made zoom level 20 for sydney
 mike

Thanks Mike,
But can we have a the quality of tiles a bit better at lesser zoom levels?

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Can we have higher resolution tiles?

2011-06-14 Thread Graham Jones
Hi Parveen,
Do you mean resolution (pixels per inch) or level of detail (which icons
appear at which zoom level?).
You can change the resolution if you use mapnik2, but that is something you
would want to do for printed output rarher than a web based map?

To change which icons appear at which zoom levels you need to alter the
mapnik style file.  You will see minzoomevel and maxzoomlevel statements
which set this.

Regards

Graham

from my phone

On 15 Jun 2011 04:42, Parveen Arora o...@parveenarora.in wrote:

Hello Everyone,
I want to know that can we produce higher resolution tiles for a tile
server, means a resolution bit more than of default produced tiles.
Please let me know the procedure of it, If any available?

--
Parveen Arora
www.parveenarora.in
E-Mail: o...@parveenarora.in

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Can we have higher resolution tiles?

2011-06-14 Thread John Smith
On 15 June 2011 13:40, Parveen Arora o...@parveenarora.in wrote:
 Hello Everyone,
 I want to know that can we produce higher resolution tiles for a tile
 server, means a resolution bit more than of default produced tiles.
 Please let me know the procedure of it, If any available?

I don't know about other map style sheets, but the default OSM Mapnik
style sheet doesn't work very well beyond z17, only areas and POIs
tend to render properly, so while you can do it, it doesn't look very
nice most of the time.

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


[josm-dev] No more Yahoo after 13th September

2011-06-14 Thread Frederik Ramm

Hi,

   Yahoo is shutting down their imagery services on 13th September:

http://developer.yahoo.com/blogs/ydn/posts/2011/06/yahoo-maps-apis-service-closure-announcement-new-maps-offerings-coming-soon/

Maybe it is too early just now, but it would be good if we remembered 
putting something in our MOTD a few weeks before so that users won't be 
surprised.


Bye
Frederik

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev