GeoBobC Posted June 5, 2008 Posted June 5, 2008 I'm using GenTyp to create TYP files for my custom maps. I've determined how to create solid line elements, but cannot see how to create a dashed line, for example. Does anyone know the trick to creating a dashed line? Quote
rwsmith123 Posted June 5, 2008 Posted June 5, 2008 I'm using GenTyp to create TYP files for my custom maps. I've determined how to create solid line elements, but cannot see how to create a dashed line, for example. Does anyone know the trick to creating a dashed line? I don't use GenTyp, but this is an example of how you would do it using cpgsmapper directly. It does it by creating a 1 pixel wide bitmap. [_line] ;Unpaved Road Type=0x0a UseOrientation=Y Xpm="32 1 2 1" "- c #008000" " c #000000" "------ ------ ------ ------ " [end] Quote
GeoBobC Posted June 5, 2008 Author Posted June 5, 2008 Thanks RWS. I can get close using your XML code; can you tell me what the 32 1 2 1 each mean? Plugging those into the XML code in MapSetToolKit creates a very faint line. Quote
rwsmith123 Posted June 5, 2008 Posted June 5, 2008 Thanks RWS. I can get close using your XML code; can you tell me what the 32 1 2 1 each mean? Plugging those into the XML code in MapSetToolKit creates a very faint line. 32 is the width of the bitmap, 1 is the height, 2 is the number of colors in the bitmap, I don't remember what the last 1 is. The next two lines define the colors for the bitmap. "- c #008000" means that a "-" is a pixel that will be dark green " c #000000" means that a space is a pixel that will be the background color. Here is an example of a 3 pixel wide bitmap: [_line] ;Trail Type=0x16 UseOrientation=Y Xpm="32 3 2 1" "* c #000000" " c #000000" " *** *** " "***** ******** ***** ******** " " *** *** " [end] This will create a small dot followed by a dash. Quote
rwsmith123 Posted June 5, 2008 Posted June 5, 2008 Thanks RWS. I can get close using your XML code; can you tell me what the 32 1 2 1 each mean? Plugging those into the XML code in MapSetToolKit creates a very faint line. 32 is the width of the bitmap, 1 is the height, 2 is the number of colors in the bitmap, I don't remember what the last 1 is. The next two lines define the colors for the bitmap. "- c #008000" means that a "-" is a pixel that will be dark green " c #000000" means that a space is a pixel that will be the background color. Here is an example of a 3 pixel wide bitmap: [_line] ;Trail Type=0x16 UseOrientation=Y Xpm="32 3 2 1" "* c #000000" " c #000000" " *** *** " "***** ******** ***** ******** " " *** *** " [end] This will create a small dot followed by a dash. Quote
GeoBobC Posted June 5, 2008 Author Posted June 5, 2008 Outstanding. That works for me in GenTyp! Just curious: which part of the code creates the small dot, and which creates the dash? Quote
rwsmith123 Posted June 6, 2008 Posted June 6, 2008 Outstanding. That works for me in GenTyp! Just curious: which part of the code creates the small dot, and which creates the dash? Each character in the last three lines of text represents a pixel. If there is an "*" the pixel is on, if there is a " " then it's off. Quote
rws Posted June 6, 2008 Posted June 6, 2008 (edited) I use Paint.NET (free graphics program) to make .bmp files to be imported into GenTYP to make custom lines and polygons. Making up the desired pattern is real easy using a graphics program. In the case of the following video demo I created a 32 x 3 pixel image to design a dashed line to be imported into GenTYP. download file and play it in Windows Media Player Dashed Line Video Demo Edited June 7, 2008 by rws Quote
eaparks Posted June 6, 2008 Posted June 6, 2008 Thanks everyone, this thread has been most helpful. With it I've been able to create various custom colored dashed and dotted lines of various sizes. Quote
rws Posted June 7, 2008 Posted June 7, 2008 One more demo...making a 5 pixel wide arrow head in Paint.NET and importing it into GenTYP. Arrowhead Video Demo Quote
GeoBobC Posted June 8, 2008 Author Posted June 8, 2008 I ditto eaparks. THANK YOU. I'm thrilled to learn how to do this. Quote
dunmappin Posted November 22, 2009 Posted November 22, 2009 I have compiled a TYP file of customised road line widths and colours and loaded it with its OpenStreetMap gmapsupp.img to my Legend HCx. The resulting display is just as it should be. I ventured further to add dashed lines to represent footpaths and tracks. The result is only half successful: the dashes and line widths display correctly, but the colour of the dash always appears white, whatever hex code I have used so far. Here is an extract from the .txt file: [_line] Type=0x16 XPM="32 2 2 1" ". c #009900" "X c none" ".....XXX.....XXX.....XXX.....XXX" ".....XXX.....XXX.....XXX.....XXX" [end] [_line] Type=0x0a XPM="32 2 2 1" ". c #999999" "X c none" "............XXXX............XXXX" "............XXXX............XXXX" [end] I wonder if anyone can throw any light on what might be wrong? Quote
seldom_sn Posted November 23, 2009 Posted November 23, 2009 (edited) Hope this isn't too much of a hijack, but whenever I use "none" as a color selection in a polygon the other color shows up white. If I substitute a color for "none" in the sample below, the polygon becomes a sort of tan. Any advice would be appreciated. [_polygon] Type=0x14 string1=4,LAS string1=0x14,LAS XPM="32 32 2 1", "! c #FF7700", "# c none", "#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!", "#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!", "!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#", "!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#", "#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!", ... total of 32 lines... "#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!", "#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!", "!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#", "!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#!#"}; [end] I just tried using c #000000 for transparent instead of "none", per RWSmith123's recommendation above, and that shows correctly as tan. Still, "none" is listed in the manual as a legitimate code, so any comments on syntax would be appreciated. And thanks RWSmith123 for the Crater Lake tutorial. It got me started mapping. Edited November 23, 2009 by seldom_sn Quote
Bob Morphew Posted November 23, 2009 Posted November 23, 2009 ... I wonder if anyone can throw any light on what might be wrong? I avoid the complication of trying to write the TYP text file and use this on-line editor. You can easily draw any images and immediately see a preview of them. Works well for me. Bob Quote
dunmappin Posted November 23, 2009 Posted November 23, 2009 (edited) Looking at my GPS in daytime, against what I saw when I first created the TYP yesterday evening, I think this issue possibly relates to daytime/nighttime colours. I shall investigate further today. Edited November 23, 2009 by dunmappin Quote
dunmappin Posted November 23, 2009 Posted November 23, 2009 My reference to the cGPSmapper manual guided me to the solution: the answer does appear to lie with entering both daytime and nighttime details into the .typ file. Here is the example from my .txt file: [_line] Type=0x16 XPM="32 2 4 1" ". c #009900" "X c none" "3 c #009900" "4 c none" ".....XXX.....XXX.....XXX.....XXX" ".....XXX.....XXX.....XXX.....XXX" [end] [_line] Type=0x0a XPM="32 2 4 1" ". c #999999" "X c none" "3 c #999999" "4 c none" "............XXXX............XXXX" "............XXXX............XXXX" [end] Quote
seldom_sn Posted November 24, 2009 Posted November 24, 2009 My reference to the cGPSmapper manual guided me to the solution: the answer does appear to lie with entering both daytime and nighttime details into the .typ file. Here is the example from my .txt file: [_line] Type=0x16 XPM="32 2 4 1" ". c #009900" "X c none" "3 c #009900" "4 c none" ".....XXX.....XXX.....XXX.....XXX" ".....XXX.....XXX.....XXX.....XXX" [end] [_line] Type=0x0a XPM="32 2 4 1" ". c #999999" "X c none" "3 c #999999" "4 c none" "............XXXX............XXXX" "............XXXX............XXXX" [end] Thanks, the day/night setting did it for my polygon, too. I saw it in the example, but didn't see it spelled out in the manual. Quote
+Red90 Posted November 24, 2009 Posted November 24, 2009 This place is the easiest way, IMO: http://ati.land.cz/gps/typdecomp/editor.cgi Quote
dunmappin Posted November 24, 2009 Posted November 24, 2009 Over time, I have read several posts recommending http://ati.land.cz/gps/typdecomp/editor.cgi. I have visited the site out of curiosity but never used it; I have always used Cypherman's GenTyp, which works well for me. But I shall certainly give it a try for comparative purposes. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.