Jump to content
GMS, SMS, and WMS User Forum
Sign in to follow this  
JKM

Importing Shapefile and scatter

Recommended Posts

Hello,

I've had a similiar issue before but I'm stuck trying to import a contour shape file into WMS. I can import the data and the lines come through but the elevation data is not there. If I import the same data into SMS, I can create a scatter file (*.h5) but it won't read in to WMS.

Any ideas?

Thanks,

John

Share this post


Link to post
Share on other sites

John,

Here is what I posted a couple of years ago about how to convert shapefile contours to a TIN:

The best way to use your contours in WMS is to read them as generic GIS data and then convert the data directly to a TIN. Select File | Add Data | Add GIS Data. Then select your shapefile. Then right-click on the contour shapefile under the GIS Data in the project explorer. Then select Convert to TIN. After the TIN is generated, turn off the TIN Triangles and TIN Vertices in the Display Options. The triangles and vertices take up lots of memory to display and you do not need to see them. Then you need to right-click on the TIN and select Triangles | Triangulate. After the TIN is triangulated, you will be able to display contours on your TIN.

There is an alternative way of creating a TIN from contours if the above does not work and if you have a small file. In this alternative method, you can select File | Open and open your shapefile. Then convert your Shapefile contours to Feature Objects (use the Shapefile -> Feature Objects menu command). When doing this, make sure you map your elevation Z attribute to your feature arc Z values. Then go to the Map module and in the Feature Objects menu there's an option to convert feature objects to a TIN.

If you have XYZ points in a text file you can read these points as TIN vertices using the text import wizard. Just open any .txt file using File | Open.

You can also read any kind of raster data as a DEM using either the File | Open command or by using the File | Add Data | Add GIS Data command and right-clicking on your raster and converting it to a DEM.

Let me know if you have any further questions.

Chris

Share this post


Link to post
Share on other sites

Thanks Chris but I have tried this and it appears that the elevation data is not being assigned correctly. I think there may be an additional column in the data that is being assigned the elevation incorrectly.

I would upload the file but it is too big. Is my suspicion possible?

Thanks,

John

Share this post


Link to post
Share on other sites

As a follow-up I've attached a screen shot of the attribute table as read from ArcMap. When the shapefile is read into WMS the data in the "Contour Type" column is assigned to the elevations instead of the "elevation" column. How can I correct this?

Thanks for your help!

John

ScreenShot.pdf

Share this post


Link to post
Share on other sites

John,

WMS is hard-wired to search for the following strings in the attribute table header fields: "elev", "valdco", and "contour". If WMS finds one of these strings in the attribute table, it uses the values in the fields associated with this field as the TIN vertex elevations. If there are two header fields with the strings that contain one of the above strings, WMS uses the first field found. Since your file has two strings that match the fields WMS is looking for ("ContourTyp" and "Elevation"), WMS uses the first one, which is "ContourTyp". To work around this issue, delete your "ContourTyp" field from the shapefile database or move it so it's located after the "Elevation" field and WMS will use the "Elevation" field. When WMS searches for these strings in the fields, the search is not case-sensitive, so capitalization does not matter in your attribute header fields.

You can also use one of the other method of getting your elevations into WMS, such as reading in an XYZ file, but it might be easiest just to remove the "ContourTyp" field from your shapefile database and try converting it to a TIN.

Let me know if I can help with anything else.

Warm regards,

Chris

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...