Subscribe to this thread
Home - General / All posts - Creating line segments to form letters and numbers
dchall8
1,008 post(s)
#12-Feb-15 16:56

I just found the KML coding that creates static lettering for Google Earth. Basically it creates line segments which appear to be a number or letter when all the line segments are turned on. So the number 7 is comprised of two geographic line segments which are only a few feet long. The number 1 is 3 line segments, etc. The KML code for part of an outlined number looks like this...

<LineString>

<coordinates>

-97.8983298640,28.8852666141,0.000 -97.8983347129,28.8852646792,0.000 -97.8983395617,28.8852627442,0.000 -97.8983444106,28.8852608093,0.000 -97.8983507166,28.8852590844,0.000 -97.8983570226,28.8852573595,0.000

.

.

</coordinates>

</LineString>

So the question is, if I have points with numbers or names associated with them, can Manifold generate the line segments which recreate the appearance of letters or numbers?

Sample image attached.

Attachments:
Image from Karnes GE.jpg

dchall8
1,008 post(s)
#12-Feb-15 18:54

I have more information which may or may not be helpful. I got a message from the originator of the KMZ file. He uses a CAD program called Bentley Microstation V8. So perhaps I could export a DXF file for AutoCAD or some other CAD software and then export KML layers from there. Any ideas about that?

tjhb
10,094 post(s)
#12-Feb-15 21:20

So the question is, if I have points with numbers or names associated with them, can Manifold generate the line segments which recreate the appearance of letters or numbers?

It's a good idea, and would be a nice project—though a certain amount of work. It might make a nice small commercial plugin if there were a market.

It should be possible to achieve it the long way round, exactly as you suggest, using any CAD tool that can vectorize fonts. Or by exporting a Layout as an image in Adobe Illustrator format (you can use the option 'Convert text to vector shapes' on export Manifold, or Type>Create Outlines after import to Illustrator) then exporting from Illustrator in DXF and importing back to Manifold.

oeaulong

521 post(s)
#12-Feb-15 22:07

proof of concept.

Inkscape to lay down text. menu: /Path/Object to Path. results in Grouped objects.

(I also ungrouped the object, not sure if this would have mattered)

Saved the file to .DXF.

Imported this into Mfd as orthogonal, adjusted its Assign Projection properties to nearby position.

Exported map of this to KML.

<screenshot>

Attachments:
GE Text from font.JPG

tjhb
10,094 post(s)
#12-Feb-15 22:29

Nice work! Nice example too.

I think it would be possible to maintain projection information through this process, by the following steps (not tested; this is thinking out loud).

Before exporting the drawing, add a bounding box, with an arbitrary margin around actual data. Adjust the lower left corner of the bounding box to have nicely rounded coordinates (or Orthogonalize the box), and note what those lower left coordinates are. Use Change Projection to reproject the drawing with Local Offset X and Y to match the coordinates of the lower left corner. This makes the lower left corner show as (0, 0).

[Do we also have to Assign Projection here to temporarily hide the offsets? I think so.]

Now export the drawing as DXF, import and vectorize the text in your weapon of choice (Inkscape is good since free), leaving the bounding box intact. Export back to DXF and reimport to Manifold. Now you can use Assign Projection to give the imported drawing the same projection as its predeccessor had before export, followed by Change Projection to restore the original and actual projection.

That may not make complete sense, and there might be a mistake. The key objective is to give the drawing a nominal datum of (0, 0) that can be directly related to its true position.

KlausDE

6,410 post(s)
#13-Feb-15 06:41

I really don't get why you would want to create letters in GIS. Why not get a TTF editor and create your font from vector areas, get rid of the unprintable hairlines problem and have the font ready in whole system, for instance in the legend as well. Who would want to place every letter of a world without guidance of a baseline, row spacing, word spaceing, letter spaceing, kerning ... and repeat this for the same letter at another position in text ?

Oeaulong's example may look nice but I don't think it's worth the effort if your not in the business of crop corn or nazca line labeling.


Do you really want to ruin economy only to save the planet?

dchall8
1,008 post(s)
#13-Feb-15 14:20

Thank you all for the great ideas.

Maybe I need to put this into perspective. I have a Manifold drawing with 35,000 points with names to be used as labels. I have two other layers of 3,000 points each. All these should be in a different style (color/size) to differentiate them from each other. Oealong's demo is beautiful, but it doesn't seem to lend itself to my situation. That is unless you can export the point names from Manifold to Inkscape. I have not used Inkscape in 5 years, so I need to look at that again.

KlausDE

6,410 post(s)
#13-Feb-15 17:48

No problem with Mfd. I have labels for rivers, localities and biotoptype codes all in different styles and size and yet control the color even of the halo of biotop codes to visualize the ecological value of this biotop thematically formated based on attributes of the drawing the lable is bound to. Text and its attributes are data in Mfd, not mere ornamentation.


Do you really want to ruin economy only to save the planet?

dchall8
1,008 post(s)
#13-Feb-15 19:35

I have lots of point labels in Manifold, too. They look great as long as you're using Manifold. But I'm sending out KML layers to customers. Point labels don't export the way I want them to appear in Google Earth.

Do you know of a way to get point labels to behave in a KML file? That's where I'm going with this. In the example I attached the display shows line segments. Those show up as fixed on the Earth, so they don't rearrange and resize themselves like regular Google Earth point labels. In the example they are line segments, which seems like a good way to do it. The authors of the example use a CAD program to export the label displays as line segments. I don't care if they are line segments just as long as they are not the free floating labels that Google Earth likes to display. I want them to appear fixed in size/location and in various styles in Google Earth. If Manifold could create the line segments automatically, that would be perfect. If they looked like oeaulong's example, that would be excellent!

tjhb
10,094 post(s)
#13-Feb-15 19:37

Is that all portable to Google Earth? I think that's the idea.

(Not a rhetorical question--I don't know the answer since I don't make data for use in Google Earth.)

[Crossed with dchall8's post.]

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.