How to convert EPSG:28992 to EPSG:4326? - coordinates

I have a list of coordinates which i need to convert to longitude and latitude in the folowing way:
What are the math transformations and formulas used to achieve this?

QGis might also be helpful to convert between several projections.
Once you can see your geometry as layer in Qgis, right click on the layer and select
Export => Save Features As ... and select the wanted format.
https://www.qgis.org/en/site/forusers/download.html

Related

Filtering polygons based on text input in mapbox

I'm trying to work out a variation on the mapbox code provided in this tutorial here: https://docs.mapbox.com/mapbox-gl-js/example/filter-markers-by-input/
But instead of filtering individual points, I'm trying to figure out how to filter polygons from a GeoJSON that have names appended based on an integer feature. Basically, I want to be able to enter the appended name of a polygon into a text box and have the map filter to just that polygon. I'm having difficulty identifying which parts of the code in the example to isolate and graft over. Has anyone tried something like this before?
When you say "filter to just that polygon", I think what you mean (in geospatial terms) is "filter to show only points within that polygon".
You will want to use Turf's "booleanWithin" function.
You will want to change this code:
layerIDs.forEach(function(layerID) {
map.setLayoutProperty(layerID, 'visibility',
layerID.indexOf(value) > -1 ? 'visible' : 'none');
});
You will have to iterate over the points themselves (not just their IDs), and use the booleanWithin function to check whether the point is within the polygon that you have somewhere else loaded.

How to convert FeatureCollection to GeometryCollection or MultiPolygon?

I have many polygons that need to be drawn manually and then get geo-coordinates.
I need to get the coordinates of the drawn polygons in GeoJSON format.
In this format:
"{"type":"MultiPolygon","coordinates":[[[[37.4653933,55.3959159]...}"
"{"type":"Polygon","coordinates":[[[37.475738525390625,55.41420507450017]...}"
Or in this:
"{"type":"GeometryCollection","geometries":[{"type":"Polygon","coordinates":[[[-98.0419921875,39.027718840211605]...}]}"
I draw polygons at http://geojson.io/.
But from this site I can only get data in the format with the FeatureCollection type.
I found another site - https://rodic.fr/blog/online-conversion-between-geometric-formats/, on which I can convert to GeoJSON format, but this site can only convert type GeometryCollection.
I cannot find how to convert FeatureCollection to GeometryCollection or MultiPolygon or to Polygon.
How to solve?
Many thx!
To get the coordinates in the geojson format, you can use the following snippet:
WITH geojson_featurecollection AS (
SELECT ''::json AS fc
)
SELECT (json_array_elements(fc->'features'))->>'geometry'
FROM geojson_featurecollection;
in which you paste your entire FeatureCollection definition (coming from the http://geojson.io website after your edits) inside of the quotes

Paraview visualization help ("density/mist" plot?!)

I am trying to visualize a data set (x,y,z,scalar) in comma separated values format. The style I want to recreate is something like a transparent 3d heat map. The value of scalar at coordinate (x,y,z) will determine the "mist density". No idea what the name of the style is. Links below give examples of what I mean:
https://www.paraview.org/wp-content/uploads/2014/04/densityoverlay.png
or
http://www.scidac.gov/Conference2006/speaker_abs/AhrensPic.jpg
Any references would be most useful as I am new to data visualizing.
Take a look at the Point Volume Interpolate filter with Kernel set to GaussianKernel.

ParaView: display director

I'm trying to display liquid crystal directors using ParaView. The director is a spin-2 field that should look like a headless vector, centred in the middle, like the cylinders in this picture:
https://pbs.twimg.com/media/C8fj1bWXoAEFy5R.png
I know how to make an arrow filter, like this other picture, but it's not what I want:
https://summerofhpc.prace-ri.eu/wp-content/uploads/2013/07/arrows.png
I can't find the filter that will do what I need. Could you please tell me if I need to create a custom filter or if there's a quicker way to obtain this result within ParaView?
My data are expressed as 3D vectors within a VTU (unstructured grid) file.
Thanks in advance and sorry for the newbie question!

Problem with location aware XML file

I am making location aware application. I have XML file on server containing information of different stores with latitude and longitude coordinates.
Now in my application i can get my current latitude and longitude coordinates and can parse XML file as well.
But how can i figure out nearest store according to my current coordinates from XML file?
If we use google Api it returns you xml file containing nearest locations according to query. but here in my case i am using xml file on server.
Please suggest
I think you'd be better off converting your data into a DB format (sqlite/mysql) so that the user can submit their lat/Lng point and just get the correct item returned...otherwise you'd need to parse and compare the whole file each time...but, you can still use that formula (it's really just shifting the comparison step to the DB query rather than within your app)
Edit: this has an example of a SQL query that implements haversine and returns x results: MySQL Great Circle Distance (Haversine formula)
This is the haversine formula for calculating distance between two points on the earth:
a = sin²(Δlat/2) + cos(lat1)*cos(lat2)*sin²(Δlong/2);
c = 2*atan2(√a, √(1−a));
d = R*c;
You can easily adapt it in obj-c.
Please note: R is radius of the earth = 6,371km;
So just calculate the latitude and the longitude difference of both points and calculate d based on it.
Hope this helps.