Error: Could not open types-file- while converting .osm file to .net.xml using netconvert - openstreetmap

I am using sumo v0.30.0 in ubuntu 16.04
I am trying to convert .osm file to .net.xml file using netconvert
xxx#xxx-H81M-S2VP:~/xxx/sumo-0.30.0/manhattan$ netconvert --osm-files manhattan.osm -o manhattan.net.xml
Error: Could not open types-file '/home/sumo-0.30.0/sumo//data/typemap/osmNetconvert.typ.xml'.
Quitting (on error).

It looks like your SUMO_HOME variable points to the wrong directory. Try something like export SUMO_HOME=$HOME/sumo-0.30.0/sumo. The directory should contain subdirectories named tools and data.

Related

Copy file from Remote Server using PgAdmin4

I am trying to copy a file from my Office Remote server as CSV output on my local machine (windows). I cannot use the export/import dialog. It shows the following error
Utility file not found. Please correct the Binary Path in the Preferences dialog
The same command works fine for local server files meaning I have already edited the binary path in the Configuration setting.
The COPY command gives the following error
ERROR: relative path not allowed for COPY to file SQL state: 42602
\Copy doesn't work either.
Can anyone suggest me a solution for this?
Good afternoon,
You can generate the CSV file like this:
copy(select * from schema.table) TO '/tmp/file.csv' WITH CSV DELIMITER '|';

Getting error while converting VMX to OVF format

I am trying to convert .vmx to OVF format using OVFtool. I am following the below steps:
Copying .vmx and .vmdk file using "scp" command from ESX server to
one linux box.
On linux box, executed command [# ovftool myVM.vmx myOVF.ovf] from
the location where .vmx and .vmdk are present. I get error as below:
Opening VMX source: myVM.vmx
Error: Failed to open disk: myVM.vmdk
Completed with errors
Please can anyone suggest
I have also noticed that on ESX there are 2-3 .vmdk files of same VM, myVM-flat.vmdk, myVM.vmdk, myVM-000001.vmdk. Do I need to copy all .vmdk files to linux box and then convert file format?
Thanks!
You have answered the question yourself :). Yes you need to copy all the files e.g myVM-000001.vmdk, myVM-flat.vmdk, myVM.vmdk to your location and then do the conversion.

bash: mongodb/bin/mongod : No such file or directory

I'm trying to install and run some basic commands on mongodb from this tutorial (on page 4).
So far,
I've downloaded the a 32-bit zip file from the mongodb download page.
I've unzip the file in the following locations home/user1 then renamed it to mongodb
I've create a folder called data then another one inside called db
I've created a file name mongodb.config containing the path of the folder where I want to store my data, which is mongodb/data/db.
But when I run the command to start the server:
user1#user1-VirtualBox: ~$ mongodb/bin/mongod --dbpath ~mongodb/data/db
I'm getting the following error:
bash: mongodb/bin/mongod : No such file or directory
Am I missing something?
Missing a '/', it should be ~/mongodb/data/db, not '~mongodb/data/db'

Why do I get an error with fopen when using matlab's mcc?

Setup:
Windows 7 Enterprise.
Matlab 7.10.0 (R2010a).
mcc compiler: Microsoft Visual C++ 2008 Express.
What's happening:
My project runs fine when running it through Matlab, but when trying to run the .exe through the command prompt after using mcc to compile, the command prompt generates an error.
The mcc command I issue is:
mcc -m -v STARTUP1.m -o EXE_REDUC
The error I receive in the command prompt is:
??? Error using ==> textscan
Invalid file identifier. Use fopen to generate a valid file identifier.
I have a file called LoadXLS.m that loads and reads a .csv file using:
fid = fopen(file,'r');
temp_data = textscan(fid,...args...);
And then I process temp_data.
The csv file I'm trying to load is called spec.csv. It is located two directories down from where I have STARTUP1.m stored. The location of STARTUP1.m is also the place that the mcc generated files are stored to. I have used the pathtool to "Add with subfolders" this location, but am aware that those locations are not transferred to mbuild when compiling.
What I've Tried:
I have gone in and added print statements to print the value of fid to make sure it is valid. When I run it in Matlab, it has a valid value, however when I run in the command prompt it always returns an invalid value of -1.
I have removed all addpath() calls, I have tried adding the STARTUP1.m directory to the mcc ctf archive using:
mcc -m -v -a 'C:\Users\...path...\STARTUP1.m_location' STARTUP1.m -o EXE_REDUC;
However when I do this, I get a different error when running in the command prompt:
Cannot open CTF archive file
'C:\...path...\AppData\Local\Temp\mathworks_tmp_7532_28296'
or
'C:\...path...\AppData\Local\Temp\mathworks_tmp_7532_28296.zip'
??? Undefined function or variable 'matlabrc'.
To fix this, I've tried adding the pragma
%#function matlabrc
to the top of STARTUP1.m to try and enforce its inclusion, but had no success.
I also copied the spec.csv file to a new directory in the ctfroot and changed
fid = fopen(...)
to:
[tempFile, message] = fopen(fullfile(ctfroot, 'Added Config Files', ad.spec_file));
The message is:
message is: No such file or directory
Objective:
Rearranging file locations is a sufficient workaround while the exectuable only runs on my computer, however the idea is to take this standalone and distribute it to multiple people on many different computers. I would like to be able to have a top folder with a startup file and within this folder, have as many subfolders as the package requires. The startup file should be able to access all subfolders and files within them as necessary.
I read something about the exectuable actually running from a "secret location" on the machine here: http://matlab.wikia.com/wiki/FAQ
I would just like to be able to group one entire folder tree with all its files into a package containing the executable and be able to run it anywhere.
More info:
When I put the spec.csv file in the same directory as STARUTP1.m, it finds it fine using mcc without the -a 'path' option and using the following in the LoadXLS.m file:
[tempFile, message] = fopen(ad.spec_file,'r');
This project contains GUIs, generates PDFs, generates plots, and also creates a zip directory.
Thank you in advance.

convert and import .osm.bz2 to postGis with osm2pgsql fails on Windows

I am new in all this. I followed tutorial http://www.spatialanalysis.ca/2011/using-openstreetmap-data-part1/ and did next:
-installed postGIS/postgreSql, PROJ4;
-saved link from cloudmade;
-create database gis;
and finally did this in cmd
osm2pgsql -d gis -U postgres -P 5432 grad_beograd.osm.bz2
and shows me error Using projection SRS 900913 (Spherical Mercator)
Couldn't open style file '/usr/share/osm2pgsql/default.style': No such file or d
irectory
Error occurred, cleaning up
My OS is WindowsXP.
Asking for help.Thanks advance!
You need to add the -S flag and point to the location of the default.style file - try the osm2pqsql -h command, which will tell you this:
-S|--style Location of the style file. Defaults to
default.style.
Make sure you actually have the file, that tutorial above doesn't really tell you where to get it, I had to do the HOTOSM install to get the default.style file and I just copied it into my folder with the OSM data.
From link http://www.bostongis.com/PrinterFriendly.aspx?content_name=loading_osm_postgis
"If you don't see a default.style file in your package, download it from the above links. For the HOTOSM install, default.style is located in the Program Files/HOSTOSM/share folder. Copy the default.style file into the same folder as your massachusetts.osm.bz2 file.
Note: IF you plan to setup a mapping tile server with OSM data later, check out Dane Springmeyer's Mapnik tutorials: http://www.dbsgeo.com/."