Vanuatu GIS Feed
@vanuatugis.bsky.social
29 followers 3 following 25K posts
The Vanuatu GIS Feed will be used to aggregate site posts. It is monitored, but will probably not be very 'personal'. - @raetlomi.bsky.social Technology Feed @vanuatutech.bsky.social. 231124
Posts Media Videos Starter Packs
Problem to convert geometry to coordinates of geometry(MultiLineString) data
I am stuck converting a geometry(MultiLineString) into coordinates. The following I did. * I download the data from this Austin Contours data link * I import the shape files using PGAdmin III and inserted around 894345 data. * In last column I got the following geom MultiLineString. 01050000000100000001020000002C00000000000080189B47419A9999D95F3C6341C2F528DC089B4741E17A14E65F3C6341A4703D2A079B47418FC2F5E85F3C634152B81EC5059B4741000000F05F3C634148E17AB4049B4741713D0AF75F3C634100000060039B474100000000603C63411E85EBB1019B47413E0AD723603C634133333313009B474152B81E3D603C6341E27A14EEFF9A4741E17A143E603C6341D7A3703DFE9A4741D7A37045603C63413E0AD703FC9A47419A999949603C63410AD7A3D0FA9A4741D7A37045603C63411E85EB31F89A47417B14AE2F603C6341F6285CCFF79A47410AD7A330603C634185EB5118F69A4741AE47E13A603C6341E27A140EF49A4741C2F5284C603C6341000000E0F39A4741E17A144E603C63419A9999F9F19A4741F6285C67603C6341703D0AF7F09A4741713D0A77603C634148E17AF4EF9A4741295C8F82603C6341B81E856BEF9A47415C8FC285603C63417B14AE67EE9A47417B14AE87603C634190C2F5A8EC9A4741EC51B88E603C63417B14AE27EB9A4741333333A3603C634190C2F528E99A4741E17A14C6603C63413E0AD723E19A4741A4703D82613C63410AD7A350DF9A474152B81EB5613C634166666666DE9A474148E17AD4613C634166666626DD9A47418FC2F500623C634152B81E85DB9A4741E17A1436623C63413E0AD723DA9A474100000060623C634100000020D99A47415C8FC27D623C634114AE4781D79A4741666666A6623C634100000040D69A4741AE47E1C2623C6341703D0AD7D49A4741EC51B8DE623C6341C2F5283CD09A474133333333633C6341EC51B8FECE9A4741CDCCCC4C633C6341333333B3CD9A47416666666E633C6341D7A3705DCC9A4741B81E8593633C63410AD7A3B0C99A4741EC51B8DE633C6341C2F5289CC89A47417B14AEFF633C63415C8FC2B5C69A4741B81E854B643C6341E27A14AEC59A4741EC51B876643C634185EB5118C59A47419A999991643C6341 When I converted this into coordinates from online link it gives the wrong coordinated data as given below {"type":"MultiLineString","coordinates":[[[3094065,10085118.8],[3094033.7199999997,10085119.19],[3094030.33,10085119.28],[3094027.54,10085119.5],[3094025.41,10085119.72],[3094022.75,10085120],[3094019.3899999997,10085121.120000001],[3094016.15,10085121.91],[3094015.8600000003,10085121.94],[3094012.48,10085122.17],[3094008.0300000003,10085122.3],[3094005.63,10085122.17],[3094000.3899999997,10085121.49],[3093999.62,10085121.52],[3093996.19,10085121.84],[3093992.1100000003,10085122.379999999],[3093991.75,10085122.44],[3093987.95,10085123.23],[3093985.9299999997,10085123.72],[3093983.91,10085124.08],[3093982.84,10085124.18],[3093980.81,10085124.24],[3093977.3200000003,10085124.46],[3093974.31,10085125.1],[3093970.3200000003,10085126.19],[3093954.2800000003,10085132.07],[3093950.63,10085133.66],[3093948.8,10085134.64],[3093946.3,10085136.03],[3093943.04,10085137.69],[3093940.2800000003,10085139],[3093938.25,10085139.93],[3093935.01,10085141.2],[3093932.5,10085142.09],[3093929.6799999997,10085142.96],[3093920.4699999997,10085145.6],[3093917.99,10085146.4],[3093915.4,10085147.45],[3093912.73,10085148.61],[3093907.38,10085150.96],[3093905.2199999997,10085151.99],[3093901.42,10085154.36],[3093899.3600000003,10085155.71],[3093898.19,10085156.55]]]} Which is not the lat long. I didn't understand why I getting this I am using the following query to get the data from the PostgreSQL database tables. BEGIN SELECT row_to_json(fc.*) as dparcel into ac FROM ( SELECT 'FeatureCollection' AS type, array_to_json(array_agg(f.*)) AS features FROM ( SELECT 'Feature' AS type, ( SELECT row_to_json(t) as properties FROM ( select * from austin.austin_contours WHERE gid = adp.gid ) t ), ST_AsGeoJSON(geom)::json as geometry FROM austin.austin_contours adp LIMIT 20 ) f ) fc; return; END; Here geom is the column name of austin.austin_contours table.
gis.stackexchange.com
ArcGIS Topographic Mapping Ideas
Community All Communities ArcGIS Ideas GIS Life Community Resources Sign In ArcGIS Topographic Mapping Ideas All communityThis placeIdea ExchangeDocumentsMembers Home All Communities Products ArcGIS Topographic Mapping ArcGIS Topographic Mapping Ideas Options Subscribe to This Board Other Boards in This Place (Nederlands) Dutch (English) English (Français) French (Deutsch) German (日本語) Japanese (Português) Portuguese (Brazilian) (Español) Spanish Suggest an idea Latest Activity (2 Idea Submissions) Sort/Filter : New Ideas Hot Ideas Top Ideas Newest Recently Updated Open Hello everyone, where can I access a 10 m resolution DEM for Africa (Libya)? I need the DEM for hydrologic modeling purposes. Could anyone recommend a reliable source to access this data? Thanks... by eliaszgheib New Member in ArcGIS Topographic Mapping Ideas Last Updated 18m ago 0 0 Open More Detailed Progression Bars for Complex GP Tools I'm running some tests using the Polygon to Centerline tool, and one big headache is managing the runtime. This idea... by MErikReedAugusta MVP Regular Contributor 5 1 Load more 71 Subscribers Idea Submission Guidelines We love hearing from you about how to improve our products. To learn how to submit a valid idea, please review the Submission Guidelines Suggest an idea Idea Labels Sort By:Top Labels Topographic Mapping 1 Ideas By StatusLearn More Open 2 Needs Clarification 0 Already Offered 0 Under Consideration 0 In Product Plan 0 Implemented 0 Closed 0
community.esri.com
The code for calculating vegetation indices in GEE
I want to write a code to calculate the vegetation indices in GEE so that there are no clouds on the field polygon But this filter, filters the entire image collection, not just the polygon! Map.centerObject(table); Map.addLayer(table); var land = ee.ImageCollection("LANDSAT/LC08/C02/T1_L2") ; var Indices = function(img){ var NDVI = img.normalizedDifference(['SR_B5','SR_B4']).rename('NDVI') var GNDVI = img.normalizedDifference(['SR_B5','SR_B3']).rename('GNDVI') var EVI = img.expression('2.5* ((B5-B4) / (B5 + 6 * B4 - 7.5 * B2 + 1))',{ 'B5': img.select('SR_B5'), 'B4': img.select('SR_B4'), 'B2': img.select('SR_B2'), }).rename('EVI') var SAVI = img.expression('((B5 - B4) / (B5 + B4 + 0.5)) * (1.5)',{ 'B5': img.select('SR_B5'), 'B4': img.select('SR_B4') }).rename('SAVI') var RVI = img.expression('(B4 / B5)',{ 'B5': img.select('SR_B5'), 'B4': img.select('SR_B4') }).rename('RVI') var OSAVI = img.expression('((1+0.16)*(B5-B4))/(B5+B4+0.16)',{ 'B5': img.select('SR_B5'), 'B4': img.select('SR_B4') }).rename('OSAVI') return img.addBands(NDVI).addBands(EVI).addBands(SAVI).addBands(GNDVI).addBands(RVI).addBands(OSAVI) } var image = land .filterBounds(table) .filterDate('2018-09-01','2019-09-01') .filter(ee.Filter.lessThan('CLOUD_COVER',10)) .map(Indices) print(image); var chart = ui.Chart.image.series( image.select(['NDVI','EVI','SAVI','GNDVI','RVI','OSAVI']),table, ee.Reducer.mean(),30,'system:time_start' ); print (chart);
gis.stackexchange.com
Speckle filter Sentinel 1 in Google Earth Engine
Are radar images already processed with speckle filter and in decibels? Below is my code, I am looking for a way to adapt it to those processes, though I don't know if the speckle can be added before obtaining the minimum and maximum values. //seleccionar la region de donde se realizará la descarga var table = table.filter(ee.Filter.eq('NOMBRE_DPT', 'CASANARE')); var sentinel1 = ee.ImageCollection('COPERNICUS/S1_GRD') .filterDate('2021-01-01', '2021-01-15') .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH')) .filter(ee.Filter.eq('instrumentMode', 'IW')) .filter(ee.Filter.or((ee.Filter.eq('orbitProperties_pass', 'ASCENDING'), ee.Filter.eq('orbitProperties_pass', 'DESCENDING')))) .filterBounds(table); var sentinel2 = ee.ImageCollection('COPERNICUS/S1_GRD') .filterDate('2021-01-16', '2021-01-30') .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH')) .filter(ee.Filter.eq('instrumentMode', 'IW')) .filter(ee.Filter.or((ee.Filter.eq('orbitProperties_pass', 'ASCENDING'), ee.Filter.eq('orbitProperties_pass', 'DESCENDING')))) .filterBounds(table); var sentinel3 = ee.ImageCollection('COPERNICUS/S1_GRD') .filterDate('2021-02-01', '2021-02-15') .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH')) .filter(ee.Filter.eq('instrumentMode', 'IW')) .filter(ee.Filter.or((ee.Filter.eq('orbitProperties_pass', 'ASCENDING'), ee.Filter.eq('orbitProperties_pass', 'DESCENDING')))) .filterBounds(table); var sentinel4 = ee.ImageCollection('COPERNICUS/S1_GRD') .filterDate('2021-02-16', '2021-02-28') .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH')) .filter(ee.Filter.eq('instrumentMode', 'IW')) .filter(ee.Filter.or((ee.Filter.eq('orbitProperties_pass', 'ASCENDING'), ee.Filter.eq('orbitProperties_pass', 'DESCENDING')))) .filterBounds(table); var sentinel5 = ee.ImageCollection('COPERNICUS/S1_GRD') .filterDate('2021-03-01', '2021-03-15') .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH')) .filter(ee.Filter.eq('instrumentMode', 'IW')) .filter(ee.Filter.or((ee.Filter.eq('orbitProperties_pass', 'ASCENDING'), ee.Filter.eq('orbitProperties_pass', 'DESCENDING')))) .filterBounds(table); var sentinel6 = ee.ImageCollection('COPERNICUS/S1_GRD') .filterDate('2021-03-16', '2021-03-31') .filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH')) .filter(ee.Filter.eq('instrumentMode', 'IW')) .filter(ee.Filter.or((ee.Filter.eq('orbitProperties_pass', 'ASCENDING'), ee.Filter.eq('orbitProperties_pass', 'DESCENDING')))) .filterBounds(table); var image1 = sentinel1.select('VH').mean(); var image2 = sentinel2.select('VH').mean(); var image3 = sentinel3.select('VH').mean(); var image4 = sentinel4.select('VH').mean(); var image5 = sentinel5.select('VH').mean(); var image6 = sentinel6.select('VH').mean(); // Crear un stacking de todas las bandas radar var stacked = ee.ImageCollection.fromImages([image1,image2,image3,image4,image5,image6]); // Scale all the images var stacked_scaled = stacked.map(function(image){ return ee.Image(image).multiply(10).add(350).uint8(); }); //crear minimo y maximo var min = stacked_scaled.min(); var max = stacked_scaled.max(); Map.addLayer(min, {}, 'min'); Map.addLayer(max, {}, 'max'); print(min); print(max); // diferencia entre minimo y maximo var diff = min.subtract(max); Map.addLayer(diff,{},'subtraction'); print(diff);
gis.stackexchange.com
Adding mouseover event information box to the top of a map using Leaflet?
I'm moving my code from the OS OpenSpace to the newer Leaflet. I've managed to get most of it working but I'm stumped with getting an information panel to show the mouse co-ordinates as Eastings/Northings & OS map co-ordinates. You can see how it works here: https://www.stevensonway.org.uk/index.php/1-the-way/mull/mull-route#map My JavaScript conversion function should still work but I need to capture the mouseover event in Leaflet and then update a label or text box with the co-ordinates. The code I need to convert is: //Code for displaying the OS Grid Reference //convert northing and easting to letter and number grid system (5 figure grid) function NE2NGR( east, north) { var eX = east / 500000; var nX = north / 500000; var tmp = Math.floor(eX) - 5.0 * Math.floor(nX) + 17.0; nX = 5 * (nX - Math.floor(nX)); eX = 20 - 5.0 * Math.floor(nX) + Math.floor(5.0 * (eX - Math.floor(eX))); if (eX > 7.5) eX = eX + 1; // I is not used if (tmp > 7.5) tmp = tmp + 1; // I is not used var eing = east - (Math.floor(east / 100000)*100000); var ning = north - (Math.floor(north / 100000)*100000); var estr = eing.toFixed(0); var nstr = ning.toFixed(0); while(estr.length < 5) estr = "0" + estr; while(nstr.length < 5) nstr = "0" + nstr; estr = (estr/100); nstr = (nstr/100); estr = estr.toFixed(0); nstr = nstr.toFixed(0); while(estr.length < 3) estr = "0" + estr; while(nstr.length < 3) nstr = "0" + nstr; var ngr = String.fromCharCode(tmp + 65) + String.fromCharCode(eX + 65) + estr + nstr; return ngr; } screenOverlay = new OpenSpace.Layer.ScreenOverlay("coords"); screenOverlay.setPosition(new OpenLayers.Pixel(675, 5)); osMap.addLayer(screenOverlay); gridProjection = new OpenSpace.GridProjection(); osMap.events.register("mousemove", osMap, function(e) { var pt = osMap.getMapPointFromViewPortPx(e.xy); var lonlat = gridProjection.getLonLatFromMapPoint(pt); screenOverlay.setHTML("" + // "E: " + pt.getEasting() + " " + // "N: " + pt.getNorthing() + " " + "OS Grid Ref: " + NE2NGR(pt.getEasting(), pt.getNorthing()) + " "); }); Here is the code to display the map: //This code uses Leaflet             OS Maps API | Basic Map WMTS (EPSG:27700) | Leaflet                     body { margin:0; padding:0; }         #map { position:relative;height:600px; width:100%; }      const apiKey = 'my key goes here';     // Setup the EPSG:27700 (British National Grid) projection.     const crs = new L.Proj.CRS('EPSG:27700', '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs', {         resolutions: [ 896.0, 448.0, 224.0, 112.0, 56.0, 28.0, 14.0, 7.0, 3.5, 1.75 ],         origin: [ -238375.0, 1376256.0 ]     });     // Transform coordinates.     const transformCoords = function(arr) {         return proj4('EPSG:27700', 'EPSG:4326', arr).reverse();     };     // Define parameters object.     const params = {         key: apiKey,         service: 'WMTS',         request: 'GetTile',         version: '2.0.0',         height: 256,         width: 256,         outputFormat: 'image/png',         style: 'default',         layer: 'Leisure_27700',         tileMatrixSet: 'EPSG:27700',         tileMatrix: '{z}',         tileRow: '{y}',         tileCol: '{x}'     };     // Construct query string parameters from object.     const queryString = Object.keys(params).map(function(key) {         return key + '=' + params[key];     }).join('&');     // Initialize the map.     const mapOptions = {         crs: crs,         minZoom: 0,         maxZoom: 9,         //Eastings & Northings         //Mull         center: transformCoords([ 137765,719705 ]),         zoom: 6,         maxBounds: [             transformCoords([ -238375.0, 0.0 ]),             transformCoords([ 900000.0, 1376256.0 ])         ],         attributionControl: false     };   const map = L.map( 'map', mapOptions);    // Load and display WMTS tile layer on the map.   const basemap = L.tileLayer('https://api.os.uk/maps/raster/v1/wmts?' + queryString).addTo(map);
gis.stackexchange.com
Animating Map Layers
Situation: I am new(ish) to the web mapping scene and I have build a web-map using the Cesium API. The scene cycles through a series of 3D polygons representing heatmaps over time. I'm loading the layers as a GeoJSON and am using the Cesium clock to cycle through the layers. I'm styling the GeoJSON by attribute and am extruding the height from a different field. As the next layer is loaded the last one is removed. What I want to do is add a transition so that as the old layer is removed have the polygons shrink and as the new layer is added it grows. I have looked at a few different animation libraries like D3, Three.js, and Babylon.js for examples but I haven't really found anything like what I'm trying to do. Question: Does anyone know of anything that can help me add a transition animations to GeoJSON layers? Not opposed to anything, very willing to learn something new! A bit of the Code: function initCesium() { viewer = new Cesium.Viewer("cesiumContainer", { imageryProvider: new Cesium.ArcGisMapServerImageryProvider({ url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer' }), requestRenderMode: true, clockViewModel: new Cesium.ClockViewModel(clock), shouldAnimate: true, }); //add an event listener to convert each "tick" into a year and use yearly ticks to call new layer viewer.clock.onTick.addEventListener(function () { tickYear = Cesium.JulianDate.toIso8601(viewer.clock.currentTime).substr(0, 4); //this if loops checks to see if the year has changed if (clockYear === tickYear) return; clockYear = tickYear; //if the timeline or user tries to use an invalid year the clock will pass over it and go to 2004 if (invalidYear.indexOf(clockYear) > -1) { viewer.clock.currentTime = Cesium.JulianDate.fromIso8601('2003-12-31'); viewer.clock.shouldAnimate = true; } else { getLayer(clockYear); removeLayer(); } }); } //remove all layers function removeLayer() { viewer.dataSources.removeAll(); } //add layer from clockYear and style the layer based on the entity properties. function getLayer(year) { //build geojson source from year promise = Cesium.GeoJsonDataSource.load('datasource part 1' + year + 'datasource part 2'); promise.then(function (dataSource) { viewer.dataSources.add(dataSource); var entities = dataSource.entities.values; var colorhash = {}; var totalCount = 0; var hashCount = 0; for (var i = 0; i < entities.length; i++) { //create variables to store and generate colours var entity = entities[i]; var name = entity.properties.Name; var color = colorhash[name]; var outcolor; var symID = entity.properties.SymbolID; totalCount += entity.properties.Count; hashCount += 1; if (!color) { if (symID == 0) { color = Cesium.Color.DARKGREEN; outcolor = Cesium.Color.DARKGREEN; colorhash[name] = color; } else if (symID == 1) { color = Cesium.Color.ORANGE; outcolor = Cesium.Color.ORANGE; colorhash[name] = color; } else if (symID == 2) { color = Cesium.Color.ORANGERED; outcolor = Cesium.Color.ORANGERED; colorhash[name] = color; } else { color = Cesium.Color.MAROON; outcolor = Cesium.Color.MAROON; colorhash[name] = color; } } entity.polygon.material = color; entity.polygon.outlineColor = outcolor; //extrude height base on count, can be adjusted if nessecary entity.polygon.extrudedHeight = entity.properties.Count * 20; } }).otherwise(function (error) { window.alert(error); }); }
gis.stackexchange.com