Calculating distance between points in two tables and including name of second point in infowindow in Carto?
I am plotting community gardens in CartoDB and want to show the nearest subway entrance in the infowindow. I have two tables with the location of the gardens and the subway stations. I am able to get the closest subway station to each community garden by using the following query:
SELECT nyc_greenthumb_community_gardens_fusion.cartodb_id, MIN(ST_Distance(nyc_subway_entrance_export.the_geom, nyc_greenthumb_community_gardens_fusion.the_geom)) as MinDistance FROM nyc_subway_entrance_export, nyc_greenthumb_community_gardens_fusion GROUP BY nyc_greenthumb_community_gardens_fusion.cartodb_id
How do I also return the name of the subway station?
It is in the nyc_subway_entrance_export table as nyc_subway_entrance_export.name.
I am assuming that once I have the name of the subway entrance, I can do a join to add the name and distance as new columns in the Community Garden table.
Calculating distance between points in two tables and including name of second point in infowindow in Carto? - Geographic Information Systems
I have a table that looks like:
I have a polygon feature class with the attributes:
Essentially, I want to join that table to the polygon, but I want each row in the table to be kept.
When I attempt a join, it only joins to one x, y, z and not all.
Postgis - How can I convert SRTEXT to PROJ4TEXT with QGIS
I have a SRTEXT like this: GEOGCS["My Data",DATUM["Not specified (.
I want to get PROJ4TEXT of this STREXT.
Can I get it from QGIS. Because I want to insert it in Postgresql SPATIAL_REF_SYS table. (or I need PROJ4TEXT data to use this projection)
You can write the text (which is called WKT) into a text file mycrs.prj , and run gdalsrsinfo on that. Running in the OSGE4W (or Linux/MAC) shell
should report the proj4 string and the WKT definition for postgis.
Leaflet geojson coordinate problem
I just started to play with leflet/geojson a little. But my coordinates are not rendered properly and I have no clue what is going on.
My coordinates are: 52.23943, 4.97599 . They work correct with the setView function.
But using a geojasonFeature they are, hmmm, 'projected', somewhere east of Somalia.
Anyone who knows what is happening here?
Out of pure curiosity I changed the coordinates around [4.976143930893815,52.23925499011473] and the point appears at its correct location. A known bug!?
I wouldn't call it a bug, just a matter of confusing and contradictory standards.
When talking about geographic locations, we usually use Lat-long. This has been codified in the ISO 6709 standard.
When dealing with Cartesian coordinate geometry, we generally use X-Y. Many GIS systems, work with a Geographic Location as a special case of a 2 D coordinate point, where the X represents the longitude and Y represents the Latitude. This order of coordinates, is exactly opposite that of the regular Lat-long notion.
The map.setView takes a l.LatLong as an input, where the first cordinate is a Latitude, and the second is Longitude.
Hence when you want 52.23N, 4.97E , you pass in [52.23943, 4.97599]
The GeoJSON standard says that for any point, the first parameter is the X Coordinate (i.e. Longitude) and second parameter is the Y coordinate (i.e. Latitude)
Hence when you want 52.23N, 4.97E in GeoJSON, you need to pass [4.97599, 52.23943]
For further reading, go through this Q&A
Problem with MCC-LiDAR (insufficient memory)
I am running mcc-lidar on a win7 64bits with 16gb of ram. Nevertheless when I try to process a las file with 1, 800 000 points using -s 0.5 and -t 0.3 the program tells me:
Error: insufficient memory if applicable use a larger post spacing.
I am able to process the data using -s 1.5 -t 0.3, so I figure the problem is not with the number of points.
The program is installed at c:program files (x86), which I understand is for 32 bits programs. Is there some specific instructions to install it as a 64 bit application in order to use my 16 gb of RAM?
Currently there is not a 64-bit compile although the source code is available so, you can compile it yourself using a 64-bit compiler.
I find your issue odd. 1.8 million points is not a very large problem and - March 31, 2018 No comments: