GPSFileDepot.com
 

News:

Welcome to GPSFileDepot!

Main Menu

Cannot install GPSFileDepot shp2mp Tool

Started by vt.flatlander, February 29, 2016, 10:17:46 AM

Previous topic - Next topic

vt.flatlander

When trying to run the shp2mp app I get a error message : missing msvcp140d.dll.

Installed on a Windows 7 Pro 64 bit machine.
Any advice would be appreciated.

Thanks.
Dennis.

-Oz-

That error appears to be related to a visual basic runtime. Can you try the version attached and let me know if it works.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

vt.flatlander

Thanks Dan
I'll give it a try tomorrow and let you know.
Dennis

vt.flatlander

#3
OK
So I was able to get the shp2mp tool installed .
I made the appropriate edits to the Combine and Convert bat files but when I run each batch file I get nothing in my "Complete" or "Split"folder.
I double checked my path names and it all looks correct.  The extracted shp2mp .exe is in my "Vermont_Topo" folder which is the same folder as the bat files along with the Split folder.
I'm not savvy enough to figure out what I might be doing incorrectly. ?

-Oz-

If you open a command window in the folder with the bat files (SHIFT right click "Open command window here") you can actually run the bat file and see what it does. It should give you an error message. If its working it should look like this:


If you have nothing in your split file that is the issue. You should have all the Lines, Points, and Polygons in that folder so that they can be processed.
The convertsplit2mp.bat will take the split .shp files and convert them to .mp
The combinesplitmps.bat will take the .mp files and combine them together and move them to the complete directory.
The compilemps.bat will then take those .mp files and conver them to .img in the complete folder.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

vt.flatlander

Dan
"Now double click on ConvertSplit2mp and let it run.
Now your split folder will contain a .mp file for each .shp file"

I was expecting to see the .mp files in the Split folder (in addition to the the original Lines_,Polygons_ & Points_tiles )and the .img files that should end up in the Complete folder.

I wanted the run the batch files from the command line but I did not know how to make it happen. I am just starting to learn basic command line computing.

Thank for taking the time to help a noob on this.  It has been a challenge .
I will give this a go to see what happens.
D.

vt.flatlander

#6
Error = incorrect parameter

-Oz-

What that means is the .bat file isn't sending all the information. Can you post the .bat file so I can take a look. I'm guessing its going to be a " problem because those definitely effect dos programs.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

vt.flatlander

@echo off
setlocal enabledelayedexpansion

REM --------------EDIT VARIABLES BELOW--------------

REM folder with all the split .shp files
set splitfolder="C:\Users\Dennis\Desktop\DH_Personal\maps\Vermont_Topo\Split"
REM folder containing GPSFDshp2mp.exe
set gpsfdshp2mpfolder="C:\Users\Dennis\Desktop\DH_Personal\maps\Vermont_Topo"
REM main dictionary file
set dictionary_file="C:\Users\Dennis\Desktop\DH_Personal\maps\Vermont_Topo\dictionary_header.mp"
REM blank dictionary file
set dictionary_blank="C:\Users\Dennis\Desktop\DH_Personal\maps\Vermont_Topo\empty_dictionary.mp"
REM Name of map
set mapname="Vermont Topo"
REM initial map ID; must be 8 digits, don't start with a 0 (zero)
set /A initialmapid=11111100

REM --------------DO NOT EDIT FROM HERE DOWN--------------

The "Split" folder along with the .exe and the batch files are all in the Vermont_Topo dir.

-Oz-

What does your Split directory look like?
Mine looks like this and it runs:


Also in the bat file if you make the @echo off line look like this:
REM @echo off
It will let you see the command. Then while its running you can hit the pause/break button on the keyboard to pause it. Scroll up and see what it says at the top; it should look like this:


I can read the lines there and with that and the directory info I should be able to figure out why the system isn't getting the correct inputs.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

vt.flatlander

The data in the Split folder has no prefix due to my previous issue with the missing prefix option in the Gridspliitter plug-in.
Why would this keep the Convert2mp.bat from running ?


-Oz-

#11
The prefix is definitely the issue. Are all those files in a folder such as Split\Lines or?

if "!filename:~0,4!" == "Line" (
%gpsfdshp2mpfolder%\gpsfdshp2mp.exe %%f "MP_TYPE" "NAME" n %dictionary_file% !initialmapid! !finalmapname!
)
if "!filename:~0,5!" == "Point" (
%gpsfdshp2mpfolder%\gpsfdshp2mp.exe %%f "MP_TYPE" "NAME" n %dictionary_blank% !initialmapid! !finalmapname!
)
if "!filename:~0,7!" == "Polygon" (
%gpsfdshp2mpfolder%\gpsfdshp2mp.exe %%f "MP_TYPE" "NAME" n %dictionary_blank% !initialmapid! !finalmapname!
)

This section of the bat looks for Line or Point or Polygon and since it didn't see those it messed up.

Since you don't have those prefixes the best option I can think of off the top of my head is to do modify the bat file to look into each folder and run a conversion.
For lines use this (modify if your lines are in a different folder):
@echo off
setlocal enabledelayedexpansion

REM --------------EDIT VARIABLES BELOW--------------

REM folder with all the split .shp files
set splitlinefolder="C:\Users\Dennis\Desktop\DH_Personal\maps\Vermont_Topo\Split\Lines"
set splitpointfolder="C:\Users\Dennis\Desktop\DH_Personal\maps\Vermont_Topo\Split\Points"
set splitpolygonfolder="C:\Users\Dennis\Desktop\DH_Personal\maps\Vermont_Topo\Split\Polygons"
REM folder containing GPSFDshp2mp.exe
set gpsfdshp2mpfolder="C:\Users\Dennis\Desktop\DH_Personal\maps\Vermont_Topo"
REM main dictionary file
set dictionary_file="C:\Users\Dennis\Desktop\DH_Personal\maps\Vermont_Topo\dictionary_header.mp"
REM blank dictionary file
set dictionary_blank="C:\Users\Dennis\Desktop\DH_Personal\maps\Vermont_Topo\empty_dictionary.mp"
REM Name of map
set mapname="Vermont Topo"
REM initial map ID; must be 8 digits, don't start with a 0 (zero)
set /A initialmapid=11111100

REM --------------DO NOT EDIT FROM HERE DOWN--------------
set /A count=1
cd %splitlinefolder%
for /r %%f in (*.shp) do (
REM get just the filename
set filename=%%~nf
REM make map name unique for each file
set "finalmapname="!mapname:"=! !count!""
%gpsfdshp2mpfolder%\gpsfdshp2mp.exe %%f "MP_TYPE" "NAME" n %dictionary_file% !initialmapid! !finalmapname!
set /A initialmapid+=1
set /A count+=1
)
cd %splitpointfolder%
for /r %%f in (*.shp) do (
REM get just the filename
set filename=%%~nf
REM make map name unique for each file
set "finalmapname="!mapname:"=! !count!""
%gpsfdshp2mpfolder%\gpsfdshp2mp.exe %%f "MP_TYPE" "NAME" n %dictionary_blank% !initialmapid! !finalmapname!
set /A initialmapid+=1
set /A count+=1
)
cd %splitpolygonfolder%
for /r %%f in (*.shp) do (
REM get just the filename
set filename=%%~nf
REM make map name unique for each file
set "finalmapname="!mapname:"=! !count!""
%gpsfdshp2mpfolder%\gpsfdshp2mp.exe %%f "MP_TYPE" "NAME" n %dictionary_blank% !initialmapid! !finalmapname!
set /A initialmapid+=1
set /A count+=1
)

This should go through each of the three folders and convert the .shp files to .mp.

You'll have to make a tweak to the CombineSplitMps.bat as well. I'm not sure how to do that yet. Do the lines, polygons, and points folder each have a file with the same name? I might be able to use that to do the combining.
Dan Blomberg
Administrator - GPSFileDepot
GPS Units: Garmin Dakota 20, Garmin GPSMap 60csx, Nuvi 255W, Nuvi 250W, ForeRunner 110, Fenix 2, Tactix Bravo, Foretrex 401
See/Download My Maps!

vt.flatlander

#12
Went back to my MAC and renamed all the files in the original  Split folder. Burned the newly names files to a CD. Loaded back into my Windows machine from work and "Voila"
The Convert2mp.bat ran perfectly. I now have a .mp file for each shapefile .