6

Sadly, most GeoJSON files conform to the specification and do not specify their projection, but fail to conform to the specification that they are stored in WGS84 long/lat. There is no general way to tell what projection such a file is in - go back to the supplier and ask them to fix their output.


4

I've done some changes to your code https://codepen.io/nettaben/pen/YzPrYrY What is new: When the dialog is open and the mouse is moving ==> the line keeps "updating" (remove and add) and the dialog moves along with the cursor. On map click the "moveAlong" behavior stops On Kendo window dragstart the behavior is changed back to moveAlong I had some ...


3

newlayer is assigned to a string, the OpenLayers addLayer() method expects an OpenLayers layer object var newlayer = new ImageLayer({ source: new ImageWMS({ url: 'http://localhost:8080/geoserver/nis/wms', params: {'LAYERS': 'nis:test4733'}, ratio: 1, serverType: 'geoserver' }); see this example https://openlayers.org/en/...


2

Earth Engine is a deterministic programming environment, so only limited forms of pseudorandom numbers are available. One of them is ImageCollection.randomColumn, which adds a property with a pseudorandom number to each element of a collection. We can use this to randomly sample by using that as a sort key: var seed = 328948349; var tenImages = Sentinel2 ...


1

I assume you're using the Earth Engine Code Editor (https://code.earthengine.google.com/)? There you're working inside a sandbox, with limitations on what you can do. You don't have access to XMLHttpRequest, amongst several other JavaScript features. If you need these features, you'll have to build a custom app (https://developers.google.com/earth-engine/...


1

You can just loop over your years client-side and add them to the map. To make this easier, you might want to set the year as a property of each image. var startYear = 2016 var endYear = 2018 var dataset = ee.ImageCollection('COPERNICUS/S2'); var years = ee.List.sequence(startYear, endYear); print(years); var collectYear = ee.ImageCollection(years .map(...


1

L.GeoJSON.AJAX object is an extension of Leaflet L.GeoJSON object and so it inherits all it's options (this is not explicitly mentioned in leaflet-ajax plugin docs). This means it's possible to use onEachFeature option to specify function where popup is binded to layer. In your case this would look something like: function onEachFeature(feature, layer) { ...


1

Instead of using the L.GeoJSON.AJAX method of loading in my data, I have opted to use $.getJSON as shown here. I was able to then load the popup at a later line using L.geoJSON and add my 'onEachFeature' using .addTo(map). This can be seen in the following code: <script> //Create initial map with predefined location. ...


1

You can use the tool at https://app.dogeo.fr/Projection/#/coords-to-points to identify a CRS, which sadly is in french. Input your point X and Y on the right hand pane, deselect "filter by BBOX" and you get the point in many different systems, all plot on OpenStreetMap background. The first vertex of your feature when interpreted as Web Mercator (EPSG:3857)...


1

The normalizedDifference() function clamps inputs to be non-negative, i.e., negative values are first set to 0 before evaluating. For most applications using normalizedDifference() is the best practice. The same behavior can be achieved with your band math method by adding .max(0) to the lines that define the red and nir variables. The fact that there are ...


Only top voted, non community-wiki answers of a minimum length are eligible