Re: [OSM-dev] gpx upload - big problem

2010-03-18 Thread Shaun McDonald
Hi,

Unfortunately the production environment requires the content length and does 
not support chunked uploads. The development servers due to their slightly 
different setup don't have this problem.

I have come across the following bugs relevant to the problem:

http://redmine.lighttpd.net/boards/3/topics/81
http://redmine.lighttpd.net/issues/2156
http://redmine.lighttpd.net/issues/1104

Shaun

On 18 Mar 2010, at 04:28, Bernhard zwischenbrugger wrote:

> hi
> 
> GPX File upload does not work.
> I always get "400 bad request".
> 
> I have no idea if there is just one bit wrong or it's completely nonsense.
> The Content-length is not clear for me, but multipart/form-data should work 
> without content-length.
> 
> Is there a way on the server to debug that?
> 
> My multipart/form-data look like below. I checked it agains the version 
> firefox sends to osm (firebug).
> 
> Any idea?
> 
> PHP code is in attachment
> 
> Bernhard
> 
> 
> Content-Type: multipart/form-data; boundary=-88f5117f17
> 
> Content-length: 1052997
> 
> ---88f5117f17
> Content-Disposition: form-data; name="trace[gpx_file]"; filename="iphone.gpx"
> Content-Type: application/octet-stream
> 
> 
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://www.topogr
> afix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 
> http://www.topografix.com/GPX/1/1/gpx.xsd";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---29cb2d8a43
> Content-Disposition: form-data; name="trace[description]"
> 
> this is a testfile
> ---29cb2d8a43
> Content-Disposition: form-data; name="trace[tagstring]"
> 
> thailand, bangkok
> ---29cb2d8a43
> Content-Disposition: form-data; name="trace[visibility]"
> 
> private
> ---29cb2d8a43
> Content-Disposition: form-data; name="commit"
> 
> hochladen
> ---29cb2d8a43--
> 
> ___
> 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] gpx upload - big problem

2010-03-18 Thread Tom Hughes
On 18/03/10 08:13, Shaun McDonald wrote:

> Unfortunately the production environment requires the content length and does 
> not support chunked uploads. The development servers due to their slightly 
> different setup don't have this problem.

That may be true, but the example he showed wasn't a chunked upload - it 
had a content length.

Tom

-- 
Tom Hughes (t...@compton.nu)
http://compton.nu/

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


Re: [OSM-dev] gpx upload - big problem

2010-03-18 Thread Tom Hughes
On 18/03/10 04:28, Bernhard zwischenbrugger wrote:

> ---29cb2d8a43
> Content-Disposition: form-data; name="trace[description]"
>
> this is a testfile
> ---29cb2d8a43
> Content-Disposition: form-data; name="trace[tagstring]"
>
> thailand, bangkok
> ---29cb2d8a43
> Content-Disposition: form-data; name="trace[visibility]"
>
> private
> ---29cb2d8a43
> Content-Disposition: form-data; name="commit"
>
> hochladen
> ---29cb2d8a43--

Where did you get those parameter names from exactly? Those are the 
names that the web interface uses - the API parameters are documented in 
the API documentation in the wiki:

http://wiki.openstreetmap.org/wiki/Api06#Uploading_Traces

Tom

-- 
Tom Hughes (t...@compton.nu)
http://compton.nu/

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


Re: [OSM-dev] gpx upload - big problem

2010-03-18 Thread Shaun McDonald

On 18 Mar 2010, at 08:31, Tom Hughes wrote:

> On 18/03/10 08:13, Shaun McDonald wrote:
> 
>> Unfortunately the production environment requires the content length and 
>> does not support chunked uploads. The development servers due to their 
>> slightly different setup don't have this problem.
> 
> That may be true, but the example he showed wasn't a chunked upload - it 
> had a content length.

Doh, I should stop jumping to conclusions.

Shaun



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


Re: [OSM-dev] MapServer, OpenStreetMap, OpenLayers + Reprojection from Latlong to Mercator: a real nightmare

2010-03-18 Thread Mulone

Thanks!
The mapfile is here: http://virtualpaste.com/82467
Note that I have tried all the combinations of projections.

-
Mulone
PhD student
-- 
View this message in context: 
http://n2.nabble.com/MapServer-OpenStreetMap-OpenLayers-Reprojection-from-Latlong-to-Mercator-a-real-nightmare-tp4753261p4755702.html
Sent from the Developer Discussion mailing list archive at Nabble.com.

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


[OSM-dev] Potlatch and TMS tiles

2010-03-18 Thread Jukka Rahkonen
Hi,

Maptiler software (http://maptiler.org) is an easy-to-use software for creating
tiles from any image format supported by GDAL. However, the tiles are created
according to OSGeo TMS specification
(http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification) and they cannot be
used with Potlatch even if the tiles are created into the Web Mercator
projection. The tiles are the same but tile naming schema is different.

Could it be possible to make Potlatch to support TMS tiles, or is there some
known trick to make TMS tiles to behave like Google tiles?

-Jukka Rahkonen-



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


[OSM-dev] Wishes

2010-03-18 Thread Bernhard zwischenbrugger
Hi all

My iPhone map tracker is now nearly finished.

There are 2 things that I can't do.

The GPX upload API is crap.
GPX is XML and there is no need for multipart/form-data upload.
To debug that kind of uploads is not possible.

A small serverside change would be much easier.

In php it is serverside:

$gpsString=file_get_contents("php://input");
$tagString=$_GET["tags"];
$descriptionString=$_GET["description"];

(post the xml, desc and tags as GET paramter)

The other possibility whould be to use gpx metadata for
OSM tags. yes yeslondon, paris, new 
york



2.) Tileserver Cache
Does somebody offer a tileserver with long cache time?
iPhone on 3G, EDGE of offline needs completely differnent cache timing.
Google Maps on iPhone is much faster, but that's because of caching.

Is it possible to set up a virtual host on the tileserver with a Cache 
that allows people
to use the map if they are not connected to the internet (no Etag 304) .

mobile-a.openstreetmap.org
mobile-b.openstreetmap.org
mobile-c.openstreetmap.org

Or better because it saves some byte.
ma.osm.org
mb.osm.org
mc.osm.org


I don't know how much browser cache iPhone offers.
Maybe it's very small and the vhosts bring nothing.
But please lets try.
I have a php tile cache here on my laptop but can't test the cache settings.
The php tile cache is too fast - same as browser cache.

6 month cachetime would be good. I can make a config option in my 
software to switch tileserver.

Please, please, please
play with cache settings.

Bernhard


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


Re: [OSM-dev] Wishes

2010-03-18 Thread Peter Körner
Bernhard zwischenbrugger schrieb:
> Hi all
> 
> My iPhone map tracker is now nearly finished.
> 
> There are 2 things that I can't do.
> 
> The GPX upload API is crap.
Please, don't do that. If you think it's not good, get the code from svn 
and fix it.

> GPX is XML and there is no need for multipart/form-data upload.
> To debug that kind of uploads is not possible.
why? there are http proxys out the, Paros Proxy to name one, that can 
debug this.

> A small serverside change would be much easier.
Okay, so go on and do it. Here's the code:
http://svn.openstreetmap.org/sites/rails_port/

> I have a php tile cache here on my laptop but can't test the cache settings.
> The php tile cache is too fast - same as browser cache.
Beleive me, php will die unter the number of requests. We're currently 
discuss using a squid cache for a company-map to keep the service 
quality independent of osm.org.

> 6 month cachetime would be good. I can make a config option in my 
> software to switch tileserver.
You now that osm tile data is not static? There are thousands of edits 
each minute and I want my changes beeing reflected by the map within at 
least an hour. I don't want 6 months of delay, not even 6 days!

> Please, please, please
> play with cache settings.
Please, please, please play with the way you talk to us. The  The GPX 
upload API is not crap, it's working very well with a lot of tools and 
just if your tool is not able to handle it, maybe your lib is crap.

Peter

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


Re: [OSM-dev] Wishes

2010-03-18 Thread John Smith
On 19 March 2010 00:21, Bernhard zwischenbrugger  wrote:
> GPX is XML and there is no need for multipart/form-data upload.

GPX might be XML, but it's not HTTP, and if you want to upload a file
over HTTP you need to talk multipart/form...

> To debug that kind of uploads is not possible.

There is plenty of ways to debug, just like everything else it's a
skill set, in this case you need to sniff packets...

= 300)
{
$body = "";
$fn .= '.gpx';
$data = gzencode(file_get_contents($file));

$body .= '--'.$boundary."\r\n";
$body .= "Content-Disposition: form-data; name=\"file\";
filename=\"$fn.gz\"\r\n\r\n";
$body .= $data."\r\n";
$body .= '--'.$boundary."\r\n";
$body .= "Content-Disposition: form-data; 
name=\"description\"\r\n\r\n";
$body .= "uploaded route.\r\n";
$body .= '--'.$boundary."\r\n";
$body .= "Content-Disposition: form-data; 
name=\"tags\"\r\n\r\n";
$body .= "automatic_upload ".date("Y F")."\r\n";
$body .= '--'.$boundary."\r\n";
$body .= "Content-Disposition: form-data; 
name=\"public\"\r\n\r\n";
$body .= "1\r\n";

$body .= '--'.$boundary."--\r\n";

$head  = "POST $url HTTP/1.1\r\n";
$head .= "host: www.openstreetmap.org\r\n";
$head .= "Transfer-Encoding: 8bit\r\n";
$head .= "Authorization: Basic 
".base64_encode($user.':'.$pass)."\r\n";
$head .= "Content-Length: ".strlen($body)."\r\n";
$head .= "Content-type: multipart/form-data; 
boundary=$boundary\r\n";
$head .= "Connection: close\r\n\r\n".$body;
//echo $head;

if(($fp = @fsockopen("www.openstreetmap.org", 80)) === 
FALSE)
continue;

fputs($fp, $head);
$line = $lastline = "";
$start = false;
while(!feof($fp))
{
$line = trim(fgets($fp));
if($start == false && $line == '')
{
$start = true;
continue;
}
if($start == false)
continue;

$id = $line;
break;
}
fclose($fp);
if($id <= 0)
continue;
}

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


Re: [OSM-dev] Wishes

2010-03-18 Thread John Smith
On 19 March 2010 00:21, Bernhard zwischenbrugger  wrote:
> (post the xml, desc and tags as GET paramter)

I forgot to mention why GET isn't used for file uploads, this is
because GET is limited usually to 10k or less.. If you had said POST
on the other hand you might have been onto something.

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


Re: [OSM-dev] Wishes

2010-03-18 Thread John Smith
On 19 March 2010 00:53, Peter Körner  wrote:
> Beleive me, php will die unter the number of requests. We're currently
> discuss using a squid cache for a company-map to keep the service
> quality independent of osm.org.

PHP like all interupted languages has this short fall, rails is really
no better just different, which is why facebook released a PHP to C
converter which runs it's own minimal web server to get away from
interupted languages but at the same time not needing a bunch of C
coders.

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


[OSM-dev] OSM accepted as mentoring organization for GSoC'10.

2010-03-18 Thread Rajan Vaish
Congratulations OSM Community,
OSM got accepted as mentoring organization for the third time in 2010.
Thanks to Graham for his much appreciated efforts and Ian for his valuable
comments/suggestions. Now, this means, that OSM will get student programmers
to work on some much needed project implementations, and Google will sponsor
them. Few mentioned here ->
http://wiki.openstreetmap.org/wiki/GSoC_Project_Ideas_2010 , please feel
free to add/edit the same.If you are a student, consider participating the
same by submitting your proposal. To begin with, explore Project ideas page,
and/or create draft of your proposal here ->
http://wiki.openstreetmap.org/wiki/Google_Summer_of_Code/2010/Student_Applications
 .

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


[OSM-dev] Edit question with respect to JOSM changeset representation

2010-03-18 Thread Thomas Emge
Let's assume I have the following situation:


   Node1 X--X Node 2 -- > way 1 sidewalk
   Node1 X--X Node 2 Node3 X---X Node 4  -- > relation 1 
route (way1, way2)
 (way1) (way2)


Which could be written in the following pseudo osm representation:






  
  
  

  
  

  
  
  

Then the user goes ahead and deletes the sidewalk feature meaning deleting 
way1. What happens to the relation1 and how is the modification expressed in 
the changeset of the JOSM file format?

Is it:



Or



  
  

Or


 (which would make way1 being deleted but what about 
relation1?)

Or

???

At what level (node/way/relation) do I need to apply the action and how does it 
affect other connected entities?

Thanks,


-   Thomas







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


Re: [OSM-dev] OSM accepted as mentoring organization for GSoC'10.

2010-03-18 Thread Graham Jones
Hi,
I would like to thank everyone that contributed suggestions to the Project
Ideas list for Google Summer of Code - the people from Google must have
liked your suggestions!.

OSM is one of 153 organisations that have been accepted onto the programme,
along with OSGeo and Mapnik.

Between now and 29th March, would be students will choose which of the
accepted organisations they are interested in, and contact them to discuss
project ideas.   I would encourage any students interested in applying to
OSM to contact us before applying to discuss their ideas if possible.
The formal application period starts on  29th March and ends on 09th April
(See the 
timeline
).

Students apply through the Google Summer of Code Web
Site.
Please apply formally as early as possible - you can edit your application
after submission and we can start reviewing it and make comments if you
submit it early.
Potential Mentors will review the applications and rank them to choose which
proposals are to be accepted.

Please would anyone who is interested in acting as a mentor contact me off
this list and we will sort out access to the site and discuss how to manage
the reviewing of applications.

Finally if any of you know a student that likes computer programming, please
encourage them to consider applying.

Thank you all for your support.

Regards


Graham.





On 18 March 2010 19:41, Rajan Vaish  wrote:

> Congratulations OSM Community,
> OSM got accepted as mentoring organization for the third time in 2010.
> Thanks to Graham for his much appreciated efforts and Ian for his valuable
> comments/suggestions. Now, this means, that OSM will get student programmers
> to work on some much needed project implementations, and Google will sponsor
> them. Few mentioned here ->
> http://wiki.openstreetmap.org/wiki/GSoC_Project_Ideas_2010 , please feel
> free to add/edit the same.If you are a student, consider participating the
> same by submitting your proposal. To begin with, explore Project ideas page,
> and/or create draft of your proposal here ->
> http://wiki.openstreetmap.org/wiki/Google_Summer_of_Code/2010/Student_Applications
>  .
>
> Thanks,
> Rajan
>
>


-- 
Dr. Graham Jones
Hartlepool, UK
email: grahamjones...@gmail.com
___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Edit question with respect to JOSM changeset representation

2010-03-18 Thread Frederik Ramm
Hi,

note that your example is slightly unusual in that you have 
concatenated two ways to form a scenic route but they do not share a 
common node. This is possible but a more realistic example would be










> Then the user goes ahead and deletes the sidewalk feature meaning 
> deleting way1. What happens to the relation1 and how is the modification 
> expressed in the changeset of the JOSM file format?

JOSM actually lets you do different things, but it never lets you break 
referential integrity. You can delete the way and automatically remove 
it from the relation (leading to a way delete and relation modify), or 
you can delete the relation together with the way (leading to two deletes).

Deleting only the way is not possible.

When uploading changes to the API, JOSM must make sure to send the 
relation modification or deletion before the way deletion, because 
otherwise the way deletion will be rejected by the API as breaking 
referential integrity.

> 
> 
>  (which would make way1 being deleted but what 
> about relation1?)

JOSM can delete nodes 1 and 2 for you if you delete the way (unless they 
are still used by something else). In that case the node deletion will 
be added to the list of changes (and sent to the API *after* the way 
deletion has been sent).

But if you are writing an editor then it might not be the grandest idea 
to use JOSM's file format (unless you want JOSM users to be able to 
process the files generated); I would instead store data directly in 
osmChange (.osc) style.

If you really want to interact with JOSM then you could join the 
josm-dev list.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09" E008°23'33"

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


Re: [OSM-dev] Edit question with respect to a changeset representation

2010-03-18 Thread Thomas Emge
Thanks for the clarification, Frederik.

Yes, I am writing my "own" editor. Based on the description at 
http://wiki.openstreetmap.org/wiki/OsmChange I had assumed that those formats 
can be used interchangeably.
I am not insisting on using the JOSM format - if there is another, more 
suitable, format then I will change the approach for my editor.

That said, would the approach be different when using the osmChange style as 
compared to your answer for the JOSM format below? In other words it is the 
responsibility of the editing client to maintain integrity, correct?

You've also mentioned that the order of sending the updates is important. Can 
all three "actions" be included in the same file and the order in the file is 
important 


   
  
  


or do they need to be issued different requests for each action type.

I am thinking of the following scenario. I am starting out with a closed way

  N1--N2
  |   |
  |   |
  |   |
  N3--N4

And the after the modifications the new way looks like

  N1--N-1--N2
  |/
  |   /
  |  /
  N3---N4

In such a way that N2 was modified and N-1 was created.

The first update against the server would be


  

  
  

  


All the changes are accepted and now with (node, old_id=-1, new_id=5) the next 
update would be


  

  
  
  
  
  
  

  



Thanks,

- Thomas

-Original Message-
From: Frederik Ramm [mailto:frede...@remote.org] 
Sent: Thursday, March 18, 2010 3:58 PM
To: Thomas Emge
Cc: 'dev@openstreetmap.org'
Subject: Re: [OSM-dev] Edit question with respect to JOSM changeset 
representation

Hi,

note that your example is slightly unusual in that you have 
concatenated two ways to form a scenic route but they do not share a 
common node. This is possible but a more realistic example would be










> Then the user goes ahead and deletes the sidewalk feature meaning 
> deleting way1. What happens to the relation1 and how is the modification 
> expressed in the changeset of the JOSM file format?

JOSM actually lets you do different things, but it never lets you break 
referential integrity. You can delete the way and automatically remove 
it from the relation (leading to a way delete and relation modify), or 
you can delete the relation together with the way (leading to two deletes).

Deleting only the way is not possible.

When uploading changes to the API, JOSM must make sure to send the 
relation modification or deletion before the way deletion, because 
otherwise the way deletion will be rejected by the API as breaking 
referential integrity.

> 
> 
>  (which would make way1 being deleted but what 
> about relation1?)

JOSM can delete nodes 1 and 2 for you if you delete the way (unless they 
are still used by something else). In that case the node deletion will 
be added to the list of changes (and sent to the API *after* the way 
deletion has been sent).

But if you are writing an editor then it might not be the grandest idea 
to use JOSM's file format (unless you want JOSM users to be able to 
process the files generated); I would instead store data directly in 
osmChange (.osc) style.

If you really want to interact with JOSM then you could join the 
josm-dev list.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09" E008°23'33"


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


Re: [OSM-dev] Osmosis 0.34 Java Exception

2010-03-18 Thread Brett Henderson
On Fri, Mar 19, 2010 at 1:47 AM, Aaron Schaefer wrote:

> On Wed, Mar 17, 2010 at 5:14 PM, Brett Henderson  wrote:
> > Okay, my question wasn't clear.  I meant, does the Osmosis installation
> path
> > have any spaces in it?  Which directory is Osmosis installed in?
> >
> > Can you also tell me which file you downloaded so that I can double check
> > it?
>
>
> My bad, your question was clear...my brain on the other hand, not so
> much. Osmosis does not have any spaces in its installation path
> "/home/aarons/projects/vendor/osmosis-0.34/". I got it directly from
> Subversion, doing a checkout on the 0.34 tag (svn co
> http://svn.openstreetmap.org/applications/utils/osmosis/tags/0.34/).
>
>
Oh!  That might explain it.  Have you compiled it?

You need to at least run "ant build_binary" in order to compile the
necessary pieces.

"ant dist" will produce a full zipfile distribution in the dist directory
(and includes the build_binary step).  "ant all", or just "ant" will do
everything including running all unit tests.  Just be aware that all
database unit tests will fail unless you have the required databases set up
and configured.

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


Re: [OSM-dev] Osmosis 0.34 Java Exception

2010-03-18 Thread Brett Henderson
On Fri, Mar 19, 2010 at 1:36 PM, Brett Henderson  wrote:

> On Fri, Mar 19, 2010 at 1:47 AM, Aaron Schaefer wrote:
>
>> On Wed, Mar 17, 2010 at 5:14 PM, Brett Henderson 
>> wrote:
>> > Okay, my question wasn't clear.  I meant, does the Osmosis installation
>> path
>> > have any spaces in it?  Which directory is Osmosis installed in?
>> >
>> > Can you also tell me which file you downloaded so that I can double
>> check
>> > it?
>>
>>
>> My bad, your question was clear...my brain on the other hand, not so
>> much. Osmosis does not have any spaces in its installation path
>> "/home/aarons/projects/vendor/osmosis-0.34/". I got it directly from
>> Subversion, doing a checkout on the 0.34 tag (svn co
>> http://svn.openstreetmap.org/applications/utils/osmosis/tags/0.34/).
>>
>>
> Oh!  That might explain it.  Have you compiled it?
>
> You need to at least run "ant build_binary" in order to compile the
> necessary pieces.
>
> "ant dist" will produce a full zipfile distribution in the dist directory
> (and includes the build_binary step).  "ant all", or just "ant" will do
> everything including running all unit tests.  Just be aware that all
> database unit tests will fail unless you have the required databases set up
> and configured.
>

I should also mention that you have to have "ant" installed :-)  It's should
be available in most Linux distributions.  Depending on how it's packaged
you may need some optional ant components, it's usually not too difficult to
add missing ones though.  You can probably install everything ant related.

If that's all too hard and you're not making any code changes then just use
the binary distribution.

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


Re: [OSM-dev] Edit question with respect to a changeset representation

2010-03-18 Thread Teemu Koskinen
On Fri, 19 Mar 2010 02:16:16 +0200, Thomas Emge  wrote:

> Thanks for the clarification, Frederik.
>
> Yes, I am writing my "own" editor. Based on the description at  
> http://wiki.openstreetmap.org/wiki/OsmChange I had assumed that those  
> formats can be used interchangeably.
> I am not insisting on using the JOSM format - if there is another, more  
> suitable, format then I will change the approach for my editor.
>
> That said, would the approach be different when using the osmChange  
> style as compared to your answer for the JOSM format below? In other  
> words it is the responsibility of the editing client to maintain  
> integrity, correct?
>

Yes, it's the responsibility of the editor, but the server enforces it,  
ie. the server doesn't allow to make changes that would break referential  
integrity.


> You've also mentioned that the order of sending the updates is  
> important. Can all three "actions" be included in the same file and the  
> order in the file is important
>
> 
>   
>   
>   
> 
>
> or do they need to be issued different requests for each action type.
>

They can be included in the same file, and yes, the ordering is important.


> I am thinking of the following scenario. I am starting out with a closed  
> way
>
>   N1--N2
>   |   |
>   |   |
>   |   |
>   N3--N4
>
> And the after the modifications the new way looks like
>
>   N1--N-1--N2
>   |/
>   |   /
>   |  /
>   N3---N4
>
> In such a way that N2 was modified and N-1 was created.
>
> The first update against the server would be
>
> 
>   
> 
>   
>   
> 
>   
> 
>
> All the changes are accepted and now with (node, old_id=-1, new_id=5)  
> the next update would be
>
> 
>   
> 
>   
>   
>   
>   
>   
>   
> 
>   
> 
>


You can do all that in one request by using the placeholder id of the new  
node in the way modification:



   
 
   
   
 
 
   
   
   
   
   
   
 
   



The server recognizes it, and uses the new nodes actual id in the way  
modification.

You can also create new way with new nodes using the same method, etc.

Teemu Koskinen

>
> Thanks,
>
> - Thomas
>
> -Original Message-
> From: Frederik Ramm [mailto:frede...@remote.org]
> Sent: Thursday, March 18, 2010 3:58 PM
> To: Thomas Emge
> Cc: 'dev@openstreetmap.org'
> Subject: Re: [OSM-dev] Edit question with respect to JOSM changeset  
> representation
>
> Hi,
>
> note that your example is slightly unusual in that you have
> concatenated two ways to form a scenic route but they do not share a
> common node. This is possible but a more realistic example would be
>
> 
> 
> 
> 
> 
> 
> 
> 
>
>> Then the user goes ahead and deletes the sidewalk feature meaning
>> deleting way1. What happens to the relation1 and how is the modification
>> expressed in the changeset of the JOSM file format?
>
> JOSM actually lets you do different things, but it never lets you break
> referential integrity. You can delete the way and automatically remove
> it from the relation (leading to a way delete and relation modify), or
> you can delete the relation together with the way (leading to two  
> deletes).
>
> Deleting only the way is not possible.
>
> When uploading changes to the API, JOSM must make sure to send the
> relation modification or deletion before the way deletion, because
> otherwise the way deletion will be rejected by the API as breaking
> referential integrity.
>
>> 
>>
>>  (which would make way1 being deleted but what
>> about relation1?)
>
> JOSM can delete nodes 1 and 2 for you if you delete the way (unless they
> are still used by something else). In that case the node deletion will
> be added to the list of changes (and sent to the API *after* the way
> deletion has been sent).
>
> But if you are writing an editor then it might not be the grandest idea
> to use JOSM's file format (unless you want JOSM users to be able to
> process the files generated); I would instead store data directly in
> osmChange (.osc) style.
>
> If you really want to interact with JOSM then you could join the
> josm-dev list.
>
> Bye
> Frederik
>


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