I am currently working with a large file of points that I want to filter according to properties and bounding box.
When I add this layer to my map using a geojson file, I can manage the cluster effect using property as mentioned in documentation but the file is quite large to load in the browser.
So I think it is better to go through a mbtiles file. I use tippecanoe for the conversion goejson to mbtiles
But, when I add this mbtiles file as a source there is a cluster-effect that I want to remove.
I am just asking how to remove the cluster-effect using mbtiles? Is it possible?
I cannot find this in the API documentation, but it's possible I missed it somehow.
Section
Dropping a fixed fraction of features by zoom level
says that default drop rate is 2.5, set it to 1 before generating mbtiles.
--drop-rate=1
Related
I am currently using Xamarin.Forms and I would like to import an image and be able to add markers to it. Similar to what the mapping apps do, but want to be able to do it from an uploaded image or from taking a photo. I would also Like to be able to set a scale on it after the image was uploaded by placing two or more markers and then entering a measurement between those markers.
When displaying an image/photo I would like to place markers on them that would have more info about the pinned location on the image. These pins must be saved in a database so that the next time it's opened the markers will be in the correct location as they were placed the first time.
If anyone knows how I can get started on this, or know of any libraries that allow you to this, it would really be appreciated.
.
Update
Loading the image from file, camera or url is simple enough.
Zooming in and out after the image is loaded was simple enough too. Altering the scale size of the Image by making use of the PinchGesture.
Moving the image around ended up being simple too, and it was achieved by using the PanGesture and altering the TranslationX and TranslationY.
.
.......Still searching for a working and reliable solution for adding Pins/Markers at a location on the image and the markers need to have a click or tap event attached to it.
I wants to move SymbolLayer icon on the map layer as per the position change, move like as a marker. In the latest Mapbox update, MarkerView and MarkerViewOptions is deprecated. So I want to move the SymbolLayer icon.
Please help me to make it work.
Thanks
There are several ways you can do this and it's kinda' dependent on what type of source + layer you're going to use. First read https://docs.mapbox.com/android/java/overview/geojson/#geojson-updates
https://docs.mapbox.com/android/maps/examples/animate-marker-position/
If you're using a GeoJsonSource, you'll set new geojson on the source when you know the new coordinate(s) that you want the SymbolLayer icon to move to https://github.com/mapbox/mapbox-android-demo/search?q=setGeoJson. Make sure you're updating the GeoJsonSource that the SymbolLayer is using.
There's the annotation plugin, which handles lots of the layer/source boilerplate code you'd have to ordinarily write: https://docs.mapbox.com/android/plugins/overview/annotation/. symbol.setLatLng(); and symbolManager.update(); will be helpful. See https://github.com/mapbox/mapbox-plugins-android/blob/master/app/src/main/java/com/mapbox/mapboxsdk/plugins/testapp/activity/annotation/SymbolActivity.java and https://docs.mapbox.com/android/plugins/examples/symbol-listener/
I am working with web-application which uses OSM and leaflet.
I want to save map image with markers, icons, polylines, polygons and other objects to vector image(SVG/ XML with SVG etc.)
I found leaflet-image but not sure it`s suitable for me.
I also use ExtJs and python as server language.
Any suggestions?
There are two official plugins for exporting/printing Leaflet maps.
Leaflet.print uses a Mapfish or GeoServer print module. Mapfish is built on Python so that could probably work for you. (For completeness - Geoserver is built on Java).
Leafet-image doesn't use any server side tech at all. Just Canvas and CORS.
You won't be able to save the tiles as vector as those are served to you as PNGs. You could recreate it using standard OSM data and a tileserver though. Both plugins will take the tiles and export them as images.
I want to publish the data in the Oracle DBMS.
Since the SRS of the data (which is EPSG:3093) is different from the SRS the client wants (which is EPSG:5179), it must be transformed.
So, I’ve set the layer property on the Edit Layer page as follows:
Native SRS: EPSG:3093 (Tokyo / UTM zone 52N)
Declared SRS: EPSG:5179 (Korea 2000 / Unified CS)
SRS handling: Reproject native to declared
The problem starts now.
When I clicked ‘Compute from data’ for Native Bounding Box, it displays the result coordinates in Declared SRS, no Native SRS.
Is this the correct behavior? Since it is ‘Native Bounding Box’, the values should be in Native SRS.
Anyways when I clicked ‘Compute from native bounds’ for Lat/Lon Bounding Box, it correctly translates from ‘Declared SRS’.
Maybe it is correct to display the Native Bounding Box in Declared SRS then. (weird)
Anyways the client (OpenLayers 3) displays the data correctly.
But another problem remains.
Integrated GeoWebCache refuses to cache the tile images.
When the logging is set to VERBOSE_LOGGING, it logs the following error:
org.geowebcache.grid.OutsideCoverageException: Coverage [minx,miny,maxx,maxy] is [0, 4097, 6143, 6143, 11], index [x,y,z] is [3101, 2791, 11]
Since the caching works correctly for the other layers that does not transform the source data (since the data is already in EPSG:5179), that must be the transformation problem. Or another one.
When I see the coverage area of the EPEG:3093 on the Demos / SRS List page on the GeoServer, the area seems to be wrong. (It does not even cover Tokyo!) http://epsg.io/3093 displays the correct one.
Is this the cause of the caching problem?
Does GeoWebCache look for the coverage of the SRS and rejects the out-of-bound request?
My GeoServer version is 2.7.1.1.
You should store your data in the native projection as GeoServer will automatically reproject the data when a client makes a request in a different projection.
Then caching and the bbox will work.
I've traced the source code from GridSubset.java to GeoServerTileLayer.java and found that the content of the gwc-layers layer file had wrong gridSubset extent coords minY value. (It was too high)
I don't know why... Since I manage the gwc-layers layer files using Git, maybe some file date inconsistency confused GeoServer to sync the values. Or maybe I just broke something. I can only guess... Now after changing that value, caching works.
I have some JSON files that define geometries, as required by r42 of Three.js's JSONLoader class. The files are version 2 of the format.
Is it feasible to manually update these files between versions?
The first obvious difference is that the file is no longer JavaScript, but actual JSON. This was easy to correct for. However the new format has a metadata section, and thirty minutes of experimentation with is isn't getting me anywhere.
I'm seeing problems because the Geometry object's material properties has an empty materials array. The resulting geometry has multiple parts with different materials, as seen in r42.
Does anyone know how I might manually tweak these .json files to work with r55?
I have no complete knowledge how the internals of the format have changed, but here's a couple of hints:
If you have the source object, the best way would be to re-export/convert. There should now also be more converters and exporters to use if your source format is obscure. If the source is unknown, some Googling might be worth it.
metadata section doesn't matter, it isn't used for anything in the loader.
There is no more Geometry.materials. Instead, JSONLoader's callback returns the loaded materials as a separate parameter to the callback. See Migration Guide (r52->r53) for more on that. In fact, the loader interface has changed also in r46.
git log of some example model files (searching for changes there could be your way forward if you really need to manually migrate) suggests that there might be e.g. UV flipping which would be difficult to fix manually but could be worked around in code. But first you'd need to get something to display on screen.
Try dragging the file into the editor, then do File/Export Geometry.
Here is a fix for drag and drop into the editor. Add this code before the drop event in index.html. I tested this in Chrome ( 24.0.1312.56 ), Safari and Firefox in OSX.
document.addEventListener("dragover", function(e) {
e.preventDefault();
});
#mrdoob's answer worked after a few patches to the editor (here and here.)
However it's worth noting that upgrading the files by hand in a text editor is possible, especially if you don't have any UV coords.
Earlier versions did not use JSON -- they were JavaScript files. The conversion is straightforward.
You can either ignore the metadata section, or else port it from the comments into an object.
If you do have UV coords, then they must be mapped differently (I believe an axis is flipped)