Comments (6)
I think you unearthed a bug! I'll try to look into this later on today.
from services_openstreetmap.
@erkinsergey, would you mind confirming this is fixed now please?
from services_openstreetmap.
During the creation of this issue, I have slightly changed the task. Now I do not need to delete tags, I just need to change the values โโof existing tags.
Therefore, the existing working functionality suits me perfectly and I can close the issue.
However, I tried to test the work of removeTags and got an error. My code:
$config = [
'adapter' => 'HTTP_Request2_Adapter_Curl',
'api_version' => '0.6',
'password' => 'password',
'server' => 'https://my_local_osm_server',
'User-Agent' => 'Services_OpenStreetMap',
'user' => 'user',
'ssl_verify_peer' => FALSE,
'ssl_verify_host' => FALSE,
];
$osm = new Services_OpenStreetMap($config);
$node = $osm->getNode(147075);
if ($node) {
$changeset = $osm->createChangeset();
$changeset->begin("Test change tags via API");
// the node 147075 have tags 'some' and 'tag2'
$node->removeTags(['some', 'tag2']);
$changeset->add($node);
$changeset->commit();
}
print_r($node->getTags());
Result - empty changeset on OSM-server (with field num_changes = 0) and catched exception:
message: Error posting changeset,
file: Services/OpenStreetMap/Changeset.php
line: 353,
code: 400
In this case, xml for changes looks like this:
<osmChange version='0.6' generator='Services_OpenStreetMap'><><node id="147075" changeset="14140" timestamp="2018-09-12T06:35:39Z" version="4" visible="true" user="user" uid="3" lat="47.1728333" lon="38.8641021" action="">
<tag k="caption" v="My Caption"/>
<tag k="power" v="pole"/>
<tag k="some" v="new_val"/>
<tag k="state" v="actual"/>
<tag k="tag2" v="tag2_val"/>
</node></>
</osmChange>
Perhaps there really is a mistake.
As I understand it, instead of empty tags, the tag should be 'modified'.
from services_openstreetmap.
Apparently, this is still not working, I'm having the same issue. When removing a tag, nothing happens on the OSM-side.
from services_openstreetmap.
You need to create a new Issue. I closed this for the reason described above.
from services_openstreetmap.
I created #42
from services_openstreetmap.
Related Issues (20)
- Can't find HTTP/Request2.php HOT 7
- Allowing to create/change two tags with the same value HOT 2
- Changeset and setTag HOT 5
- Removing Tag? HOT 5
- tests/TagsWithSameValueTest.php not adressing the problem HOT 1
- Use https for openstreetmap.org servers HOT 1
- How to do error handling? HOT 5
- Wildcard search HOT 3
- Oauth 2.0?
- Disable verify ssl validation HOT 9
- Split out documentation from README into separate files. HOT 1
- Expand to get details of multiple users.
- Expand Services_Openstreetmap_Config object
- Add support for retrieving notes via the /api/0.6/notes/search endpoint. HOT 4
- Add checks that lenghts of keys and values on objects don't exceed 255 characters each HOT 4
- Removing tags is not working
- Dependabot can't parse your composer.json
- Dependabot can't resolve your PHP dependency files
- new Way create method and building creation using way(area polygon) code sample
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from services_openstreetmap.