Lat-Long co-ordinate plotting in Sketchup

I have a set of specific Latitude and Longitude co-ordinates that I wish to use to create a single surface/flat polygon.

An example of the type of dataset that I’m working with is shown here:

https://drive.google.com/open?id=1-KCZOBDddJBtzBzh93WbzOYMNMKm5m-7

Is there a plugin available that can import the data to create such an object? or other method to do this? - I’ve search all possibilities that I can think of and come up with no clear way forward

  • Thanks for any help in advance -

Scott

Is this something that you know a solution to? I noticed your work on another topic @jimhami42 -https://forums.sketchup.com/t/xyz-file-terrain-modeling/40497

Just an idea that might or might not work for you.

Streetmap.co.uk will accept latitude and longitude coordinates. If you then go to “Click here to convert coordinates” at the bottom of the page, you can find other info that can be used in Google Maps say. That may make importing a location easier if that is what you are after.

Streetmap is UK based.

Hi @simoncbevans

shown below is an example of the co-ordinates:

https://imgur.com/a/KcNMJ

Essentially, what I’m trying to do is to create an polygon in SketchUp that is the exact same shape. I then wish to texture the object, and when imported back into the original program, it will then appear with the texture that I painted on in SketchUp.

The object doesn’t need to be imported into Google Earth. It’s for a game.

Here’s an import of your dataset. It uses the latitudes and longitudes as x/y coordinates and connects them using edges. The coordinates are scaled 1000x to prevent the loss of data due to interpreting the lat/long as inches.

The model: lat_long.skp (15.5 KB)

A simple Ruby plugin to read the files of this format: jimhami42_import_lines_2.rb (1.4 KB)

2 Likes

Scott

The basic structure of my data was XYZ, also not Long/Lat but in Meters.

IMO my stuff is not of help for you, sorry.

All the best

Thomas

Fundamentum AG
In der Höhi
Banneggstrasse 34
CH-9506 Lommis TG
+41 (0)71 565 15 55
+41 (0)78 763 96 33

1 Like

@jimhami42 You Sir, are awesome! I have tried and tried to even get a plugin to work, without any luck.

I believe I’m probably creating a problem when scaling. I clicked scale, selected middle corner node and then dragged and entered 1000 as the scaling unit number. In doing so, below is what appeared (with the orange area being an existing but inaccurate poly that is 95-99% correct in width, and 100% correct in height):

It looks as is the new poly that you managed to create is almost half the size. However, when scaled by x2, it was not true size. I played around with it and scaled it up again [I now can’t replicate this again], to which this is the result:

I normally work in cm, mm, and meters, so is there something extra that I need to do to make this work in inches, and make sure that its accurate? or would it be possible to use the plugin without the x1000 scale reduction without causing SketchUp problems?

Something that skipped my train of thought last night was having to “cut-out” sections of the poly to create holes in certain areas. Could this be done in a single run of the plugin, or require a separate run for each?

I apologize for not providing a clearer explanation … the simple plugin I used doesn’t do any GPS to real-world scaling. If you run it with the raw data, the lines it tries to create are too short for SketchUp to create if you interpret the coordinates as inches (i.e., less than 0.001 inch or 0.0254 mm). To get around this, I multiplied each coordinate by 1,000 to make “bigger” inches. The actual distance between any two GPS coordinates depends on the latitude. For the London Airport, for example, the GPS Latitude distance can be multiplied by 365018.56759285333 to convert from GPS to feet in the North/South direction. Similarly, the GPS Longitude distance can be multiplied by 227799.83974997554 to give the distance in feet in the East/West direction.

Rather than try to scale the model, I modified the plugin to use these values to create a model in feet. Then I changed the SketchUp units to meters and textured the imported face with a screenshot from Google Earth.

Model: lat_long_meters.skp (715.4 KB)

BTW, you might find it easier to view/align things if you work in parallel view instead of perspective. At least until you have all your 2D work done.

Handy conversion calculator: Length Of A Degree Of Latitude And Longitude Calculator

Plugin in RBZ format (set model units to feet): jimhami42_import_lines_2.rbz (695 Bytes)

1 Like

You create a LatLong object, use that to get a UTM object and use that to get a Point3d model coordinates. I think there is a bug in converting LatLong directly to Point3d. Also I think SketchUp uses the wrong sign for solar north (the difference between UTM north and true north) when it converts coordinates. I’ve been lurking in this part of the API years ago but gave up because I couldn’t make much sense of it.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.