Start a new topic

set projection

Original Post by: Tharak Tue Dec 4 09:44:20 2012

Can any body please help on this issue.. It is some what urgency for me.

• I have projection issue here when exporting to .Flt format. We are creating the buildings on a Geographic Lat/Lon based WGS84 datum terrain base. The buildings are going to get the geographic coordinates.

• Below code shows what i set the projeciotn for the flt with "geodetec" projection . Is it correct or not. Otherwise please set it properly. i am getting flt but it is nor visible when i open that flt in other softwares.

Please advise me on this…


fltHdrUnits, 0,


seta= mgSetAttList(db, // I am getting seta value is 1. SO I think it is taking projection. But

I did not get proper .flt format.

fltProjection, 5,


printf("ss %d",seta);

Original Post by: ChrisRogers Tue Dec 4 15:51:50 2012

I'm not sure what you mean by "did not get proper flt format." Can you explain what is wrong with your flt file? Can you explain what a correct flt file would look like? (for this am asking what specific attributes would you expect on your nodes etc...) Do you have an eample flt file that works as expected in your runtime?


Original Post by: ChrisRogers Tue Dec 4 17:32:08 2012

As far as I know, setting your projection to Geodedic, and entering lat/lon values for your vertex coordinates is all you need to do. I varified that this works in code to produce a database with the attributes all set up as expected. I notice that you se thte units for your database. Please note that the untis for Geodedic perspectives really don't mean much. The coordinates will be interpreted by the runtime as lat/lon values and it will ignore your db units selection. Please be aware that when wroking with lat/lon values, it may be a little difficult to navigate to small objects like buildings. You may have to play with your switch distances and your zoom speed before you are able to get usable results.

Original Post by: Tharak Fri Dec 7 05:03:02 2012

Hi Thanks for u r reply. Actuallhy my problem is after setting the "Geodetic" projection and passing latitude and longitude values i am getting flt like this. I am not able to see the flt in other softwares. It is invisible.

i am attaching sample code also and corresponding flt also. I am not understanding where is the problem. Please rectify my code if any probloem in my code. Please find the attached .zip file. In this one i added corresponding source and exported flt file and textures files. After compiling that source we will get one flt file. I am not able to see that flt file.

My requirement is i will flt file with geo lat and lon values.

Original Post by: Tharak Mon Dec 10 09:37:07 2012

Hello Suppert.

Please give me reply as soon as possible. We have to complete certain things

Original Post by: SteveThompson Mon Dec 10 17:37:36 2012

I just opened your flt file in Creator and I can see it. Note that since it is "so small" you have to adjust View>Viewing Volume near clipping plane to be very small. I suspect the value you are using in Near clip in Creator is keeping it from being visible.

Original Post by: SteveThompson Mon Dec 10 17:42:26 2012

Quick update... even though I can see it, the faces are all facing "inward" so i doubt any runtime would show this (the geometry faces are facing backward so will be invisible unless you are "inside" the object). Vertices will appear ordered counter-clockwise when looking at the "front" of the face so you need to adjust your code to add the vertices to the polygon in the correct order. Also note that the vertex positions on some of the "wall" polygons don't appear to be correct either. You need to check your code there as well.

Original Post by: SteveThompson Mon Dec 10 17:54:32 2012

Hello Suppert.

Please give me reply as soon as possible. We have to complete certain things

Hi Tharak,

From this wording on your recent post, I believe you may misunderstand the purpose of this forum as well as the expectations on it. This forum is a "peer-to-peer" forum in which customers and Presagis employees can share information and answer questions as best they can. Technically this forum is not a "support" forum and as such there is no expectation here that answers will be provided in a timely manner. We do the best we can here but if you have time-critical questions that require immediate attention (and are not getting that here on this forum) you can also contact our technical support team directly.

Thanks for your participation here and we'll try to keep things moving the best we can ;-)

Original Post by: Tharak Thu Dec 13 11:35:44 2012

Hello Support,

Thanks for your support.Still i am getting the same problem.My flt flie is invisible. I kindly request you can u give one sample for "How to create new flt file with Geo lat,lon values. In previous mail i attached one sample. Give me new sample or edit the sample what i attached in previous file. Give any small sample with one polygon with geo lat,lon values. How to set geo lat,lon values with single polygon please.

Original Post by: SteveThompson Thu Dec 13 14:53:41 2012

Hi Tharak...

First... As I mentioned in my earlier post this is not technically a "Support Forum". On this forum you'll find folks who just want to try to help (if they can). If you need formal technical support you need to contact our tech support team.

Second...(and sorry if this was not clear in my earlier post) you are creating your geometry correctly EXCEPT you have put the vertices in the wrong order on the polygons (and some minor problems with their position that you should be able to sort out on your own). When you get the order of verts wrong on the polygons, all the polygons of your building face "inward" (not outward as you desire). This makes your geometry invisible. There are many ways to fix this but If you simply change this (and blocks similar to this in your code) ...


// attach the vertices to the polygon

mgAttach(poly, vertex[0]);

mgAppend(poly, vertex[1]);

mgAppend(poly, vertex[2]);

mgAppend(poly, vertex[3]);


// attach the vertices to the polygon

mgAttach(poly, vertex[0]);

mgAttach(poly, vertex[1]);

mgAttach(poly, vertex[2]);

mgAttach(poly, vertex[3]);

... then your vertices will be in the correct "Front Facing" order. Remember if your looking at the front of your polygon, the vertices will be ordered Counter Clockwise. And there is no need for me to repost a sample project with these fixes. You can change your code accordingly. Everything else seems to be correct.

Note mgAttach adds the vertex to the front of the vertex list, while mgAppend adds the vertex to the end of the vertex list. You need to know and control the order of the vertices on the polygon so it faces the correct direction.

Next... (and again I am sorry if I was not more explicit in my earlier post) another reason you may not see the geometry in Creator is that the default Viewing Volume is not set up correctly. When you have very small geometry (which you do) when you "fit" on it, it comes very close to your eyepoint and can often be clipped out by the near clipping plane. If you bring the near clipping plane closer to your eye, you will be able to see your building. Also for small geometry you want a very small "Zoom Speed". This is the rate at which the zoom (Shift+Right Mouse) zooms through the scene. If "too fast" you'll zoom right past your geometry and won't have the control you need. Use the Zoom Control command to change this speed.

And finally, I am able to see your geometry in Creator (albeit inside out because of the incorrect vertex ordering - but it is there). You can see it also here in the image I've attached. So if you fix the order of the vertices, adjust the near clipping plane, you should be able to see it also (in Creator).

Are you using Creator to view your building or some other tool?

Original Post by: Tharak Fri Dec 14 06:12:23 2012

Ok Thanks for u r reply. Where i can get creator software. Can u suggest me on this how to get creator software. And one more question is this APi will support programming in .net technologies?

Original Post by: SteveThompson Fri Dec 14 06:31:59 2012

Creator is a 3D Modeling Package from Presagis (the same company that provided you the OpenFlight API). You can learn more about Creator and Presagis at There you will find contact info if you want to purchase or evaluate Creator.

The OpenFlight API you are using supports C/C++ programming and Python Script programming only currently. I presume since you have written a program using the OpenFlight API, you have installed the SDK. If so, you are currently in possession of the entire API. The User Guides and other documentation will tell you more about it. Again, no, it does not support any .NET technology, just C/C++ and Python.

Thanks for your interest and let us know if you have any other specific questions.

Login to post a comment