generating street map from openstreetmap dat through osm2wkt - openstreetmap

i am trying to generate street map of a city from openstreetmap data. i have used osm2wkt tool but it converts it into wkt file. is there any way to convert in map rather than in wkt file.

A printed map? An online "slippy" map?
Obviously osm2wkt is not the tool you want if you don't want wkt.
To custom-design your own online slippy maps you can use TileMill.
If you just want to get a PNG or SVG or PDF of one place, you can just go to http://www.openstreetmap.org/ , browse to the place you want, and use the "Export" tab.

As stated on the osm2wkt site you can use OpenJump to visualise WKT data. You can find a tutorial (PDF) here.

First, go to http://www.openstreetmap.org/ and select the coordinates of the area you want. Then, choose export . It will give some file in .osm format like map.osm.
Now we have to convert the map.osm file to map.wkt file. Use osm2wkt jar for that purpose. Download that jar file from http://www.tm.kit.edu/~mayer/osm2wkt/.
Now, use the following command.
java -jar osm2wkt.jar map.osm
Now, open the file with OpenJump. And save it in .wkt format by selecting points in the map as you want.

Related

How do I get the appropriate file format from Open Map Tiles?

I have downloaded multiple areas from OpenMapTiles for a project. Sometimes the file contains the extent or location with the date in the .mbtiles format. Other times I get a file name like 1_EOzgCOZOqPAcEFBcsVJbgd-bvHyz5Dw with no specified file format and it appears unreadable.
The only support for this site appears to be here. How can I get the appropriate .mbtiles format for all of my downloads?

Is there any way to convert lammp_file.data to Gromacs files (top and gro), if not then to or to CHARMM files (psf and pdb)?

I have a lammps_file.data and I need to convert it to Gromacs files (gro and top) to run my simulations.
Does anyone know how to do this?
Another choice is to convert from lammps to charmm files (psf and pdb). Once I get the charmm files I can just use Topotools to get the gromacs files I need.
Thanks
Indeed, NOW I am trying to do the same myself.
So far, you can use intermol , this should work fine to convert LAMMPS data files to Gromacs files. Once you install intermol, and you ceate a path to the intermol converter, you can use a command like:
python2.7 $conv/convert.py --lmp_in topology.data --gromacs -v
CHECK the format of your data file, I still having problemst to convert it.
If you wish to create the psf file,
you would need VMD (google it), then open the tcl terminal and write :
topo readlammpsdata topology.data full
animate write psf topology.psf
The 1st line is for loading yur LAMMPS data file, if you are in the folder where
that files is located
2nd convert the data to psf CHARMM
Also, you could try this. In this paper, they provide a tood to conver
CHARMM topologies to gromacs here. Thus, you convert to psf, then to gro top.

How to convert las file to ply file?

I want to open my 3D point cloud in MATLAB. But they are in .las files. How can I display them in MATLAB???
I heard about .ply file can open 3D point data on MATLAB. So I want to know how to convert las files to ply files.
There is a .las file reader for matlab here:
https://es.mathworks.com/matlabcentral/fileexchange/48073-lasdata
Once you have the data in matlab you can use these point cloud tools, which are part of the computer vision toolbox:
https://es.mathworks.com/help/vision/3-d-point-cloud-processing.html
If you want to embrace the open source force, I'm writing a Python (easy transition from matlab) library for point cloud processing:
https://github.com/daavoo/pyntcloud
You can use the free and open-source CloudCompare software.
On the command line:
CloudCompare -O file_to_convert.las -C_EXPORT_FMT PLY -SAVE_CLOUDS
Take care to the order of the options: it seems that -SAVE_CLOUDS must be at the end.
That will result in a binary-format PLY file in the same directory as the file to convert, named using the original filename and the date of export, like: file_to_convert_2019-07-18_13h32_06_751.ply
I found no way to specify the output file name (should you find one please comment below).
Should you want a more predictable name, add option -NO_TIMESTAMP before the option -SAVE_CLOUDS (but then you risk overwriting files so be careful).
More help (such as how to export in ASCII-format) in the documentation.
I timed this on powerful PC, it took 170s to convert a 2.7GB LAS file with 102M points (XYZ,intensity,time).
if you have LAStools installed, you can use las2txt to convert your *.las/*.laz files into *.xyz format which MeshLab can import natively as a point cloud, which may then be converted into a Mesh.
There are a multitude of caveats to that depending on the source of your data-set.

Coordinates convertion with QGIS

i'm trying to convert coordinates from Monte Mario italy 1 (EPSG 3003) to WGS84 (EPSG 4326). These coordinates are contained in a csv file. To do that i'm using QGIS (2.0.1 dufour). So i open the file opening "layer" menu and i select "Add delimited text layer". Then i open the file specifying the source and QGIS autodetects the columns which contain the coordinates. After this i specify the coordinatea format as EPSG 3003. QGIS open the layer perfectly. Then i try to save the file as "delimited text" specifying that i want it in EPSD 4326 format. The output file is just the same as the input one. What's wrong ?
Did you try to repoject your data via GDAL_transform in the console:
Create a shape file within qGIS and then reproject from -s_srs "EPSG:3003" -t_srs "EPSG:4326".
Actually i solved this. I start creating a SHP file from the file in format CSV. This can be done by the ogr2ogr. Still using ogr2ogr by the shell i used the command ogr2ogr -s_srs EPSG:3003 -t_srs EPSG:4326 -f CSV [Dest file].csv [Source file].shp -lco GEOMETRY=AS_YX.
I had the same problem and I don't Why QGIS works like that.
The QGIS does convert from one coordinate to the other. Instead of reading the CSV file, try reading the shape files. Generally, the shape files contain more information than any other files..It is easy to read a shape file using java or python.
Follow the below steps,
Read the shape file
Save it as a text file
Convert it to the required format you want

Import .kml into .osm file

I have a pretty big .kml file (it is the property of my company, and I can legally use it), what I want to import into an .osm file, downloaded from download.geofabrik.de. I can open this .osm map in softwares, for completely offline usage, such as Marble.
My question is: can I somehow merge this kml and osm file, so when I open the merged file in Marble, the routes described by the kml are also visible? So basically, I want to merge a.kml with b.osm, resulting in c.osm, what I can use offline.
Is it possible? If yes, can you direct me in the right direction?
Any help is appreciated, thanks!
Some notes:
I have tried GPSBabel, it indicates that it can convert .kml to .osm. It generates a 65MB .osm file from my 12MB .kml, but when I open it in Marble, it does not show any routes, so it looks like a dead end. :/
The weird thing is, GPSBabel produced an input what QGIS could open. I merged the two .osm file with osmosis, but the problem is, the output is invalid, nothing can open it.
JOSM does not open the original .osm file, what is 1GB of size.
ps: I have posted this on help.openstreetmap.org as well, but for now, nobody could help me, so I am trying to get some answer here, maybe... Sorry for the "repost", and thanks for the help! :)
What you want to do is honestly the wrong way to go about it, but still possible.
The first step is to use ogr2osm with the command-line flags --positive-id, --add-version, --add-timestampand with--id 3000000000` (or some other number larger than the largest node ID in the file.
You will then have a .osm file that Osmosis or Osmconvert can merge with another file, in this case your downloaded software. In the case of osmosis, osmosis --read-xml internal.osm --sort --read-xml extract.osm --sort --merge --write-xml combined.osm (untested)
A more common way would be to download the shapefiles for the region from geofabrik then use ogr2ogr and similar tools to combine them with the .kml file in the output format of your choice.
Keep in mind that if you distribute this "derivative database" you have created, it has to be licensed under the ODbL. This does not apply if you're distributing it internally only.