Auto tile rule: if next to a certain map - godot

I am not sure if the title make sense but, as you can see above, I have two tile maps of ocean / lake. How would I set a rule to join the ocean tile maps when they are next to each other?

Related

Render objects based on zoom level in Azure indoor maps

Is there a way to show/hide objects on a map based on the zoom level in azure indoor maps module? Honestly, I'm not so sure if this feature even exist yet
Custom styling of indoor maps in Azure Maps is a planned feature.
Note that indoor maps leverage vector tiles for rendering and items that don't appear when zoomed out, are not loaded in the map, so you won't be able to show things that aren't there at this time. There will likely be some configuration for this in the future. Things that do appear today could potentially be hidden although in a bit of a hacky way since this custom styling of indoor maps isn't officially supported yet.
For example, using the building from the indoor maps tutorial, the following sets the zoom level range of the room number labels to 0 - 22.
map.map.setLayerZoomRange("indoor_global_unit_label", 0, 22)
The first value in that function is the id of the rendering layer which I retrieved by running the following code in the console, then moving the mouse over the item I wanted to get the id for:
map.events.add('mousemove', function (e) { console.log(e.shapes[0].layer.id ) })
The second and third parameter of the setLayerZoomRange method is the min and max zoom levels. When that line of code is ran, you will notice the labels appear when zoomed out much longer than usual, however, if you zoom out enough, they disappear since they become no longer available in the vector tiles.

How do you ID GeoHash points that are NOT over land?

I have a list of coordinates in latitude/longitude that I have converted to GeoHash. My goal is to ID the points that are reported to be over water (oceans, seas, etc. outside of any countries borders). I also have a data set of all the shapes of all the worlds countries borders in latitude/longitude converted to GeoHash too.
So for a given GeoHash point I am trying to be able to classify it as being over (international) water or not. I thought about picking points manually in the middle of the ocean and using a short GeoHash prefix to create a large box in the ocean but that is fairly limited.
Perhaps generally there is a way to understand what it means to be a GeoHash point outside of any countries borders?
It is not a good use of geohash. Geohash is good at identifying specific points, but not great at describing complex shapes like country borders or ocean.
I thought about picking points manually in the middle of the ocean and
using a short GeoHash prefix to create a large box in the ocean but
that is fairly limited.
Yes, that will give very imprecise result. What you need is to test each point, whether it belongs to any country's polygon. How you do this depends on the platform you use, e.g. in SQL you run an ST_Intersects(point, country) query.
I would just convert geohash back to lat/lon pair and check them.
If you do want to use geohash or if you have too many (billions) of points, you can use the short GeoHash prefix trick - but you would need to use many prefixes to represent each ocean. Something like the following, using prefix tree:
start with GeoHash length of couple letters,
for every possible GeoHash string, compute whether its box is fully contained by the ocean or land (using ST_Intersects or similar precise method).
if whole box belongs to one class - add it to prefix tree.
if not - add more letters (again, all possible combinations) and continue recursively up to some limit, where you need to stop.
Once you've built such tree - you can use GeoHash to lookup your answer quickly in this tree.

How can I filter/clip a raster provided by WMS - Geoserver

I'm trying to filter/clip a raster provided by a Web Map Service from Geoserver.
I dont want to clip based on a polygon; I want to filter based on a value such that all raster pixels below this value are black or transparent.
As far as I know I can not use cql_filter since its only for WFS Feature Requests and not for WMS Raster images.
Maybe you have an idea how to solve my question.
A WMS does not return you data, it returns a picture of your data.
So there are two possibilities:
You use a Web Coverage Service (WCS) request which will return you the actual data in your raster. Think of it as like a WFS for rasters. The GeoServer manual covers the mechanics of making a request and there is a request builder under Demos for you to experiment. I'm pretty sure this will only allow you to subset by rectangular areas, though your client is free to do more complex operations of the returned data.
You can consider this a styling exercise in which case it should be possible to set up an SLD style that performs the operation that you need. You will need to use a spatial filter to clip the underlying raster and apply two rules depending on if it is true or false. You can even pass the polygon in as an environment variable from the request if you need.

Determine if point already shown on google earth

I have a large dataset of points and to stop from showing them all at the same time i'm using nested regions. These regions have network links in them to a server which generates kml files of points and more network links. I'll show x points at the outermost region. That region is made up of smaller regions each showing x points etc. I don't want to show each point more than once. Each point is eligible under many different regions. How can i determine if i've already shown a point?
Ideas:
Use a deterministic algorithm to pick out the points for a level so each region can reverse calculate what points would already have been selected. Problem is that as soon as a point gets added to the database, the algorithm is no longer going to work as the parameters have changed. Also sounds sloooow.
store in the db upon population what region a point should be shown at based on some algorithm. Problem is have to decide where to put a point every time you add one. (not that bad initially assign regions for all points though)
Edit: Or instead of using accumulative regions i could set the maximum LOD for each region.
Con is lots of points could be loaded multiple times. Pro, should be pretty simple / updating DB when already in google earth won't hurt things
Edit Edit: Tried using exclusive regions (https://developers.google.com/kml/documentation/images/LodRange3.gif) Ran into some problems. Namely, if you set there is slight overlap where one region ends (max LOD) and another starts (min LOD) could make it so there's a gap, but it will never be perfect. Also this is okay if you start fully zoomed out so the outermost region is 'active', then as you zoom in somewhere the regions will become active. Problem is if you start zoomed in, then your your outer region is never loaded, so it never loads any of it's subregions and the placemarks won't be displayed. Generating all the possible regions from the start (just not displaying them) is not an option as there would be millions of files

Group features in Google Earth to hide detail when zoomed out

I'm trying to generate a KML file to display a set of features scattered around the UK. I would like the features to be grouped together at higher zoom levels, ideally displaying as an icon with a count of the number of features, so that users can see clusters of features easily.
Essentially I'm trying to do something along these lines, but in Google Earth, not Maps.
Can anyone point me in the right direction. I'm a bit of a newbie with KML :-)
Cheers,
RB.
ANSWERS :
My own research suggests I can do what I want using Regions to define bounding boxes for certain features.
It has also been suggested I should do this using network links, which I'm going to investigate as I think it's a better match for other reasons too.
Is this a standalone KML file? Or the KML returned as data for a network link?
In the first case I'm not sure this is even possible. I have seen layer transparency change with "camera altitude", so perhaps something like this is also possible on features? Then you could add both the single features and the groups features into the same KML file and make them visible based on "distance to camera"? Could be a new KML feature I missed, but you'd have the check the KML specification.
In the second case, you just return KML that matches the given network link viewport information. Based on the bounding box you get, you can subdivide that box into a grid and cluster per box. If you have one feature in a box, return the feature. If you have more than one in a box, return just a "grouped feature" for that box. The clustering will then automatically change when the user moves around in Google Earth: after each camera change your network link URL is called again and you again do feature selection and clustering with the given bounding box viewport. This makes your clustering dynamic.
Does this help?

Resources