<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello,</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
It's for a custom coordinate system for VR. Geojson provides a very easy syntax for properties and geometries that I like to use with origin at 0,0 bottom left.</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'll probably write my own converter, as OBJ is kind of an important file type we need to support.<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks,</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<a href="https://www.ski.org/users/brandon-biggs" title="https://www.ski.org/users/brandon-biggs">Brandon Biggs</a></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Engineer</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Smith-Kettlewell Eye Research Institute</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Office: <span style="font-size:10pt; font-family:Arial; text-align:center">415-345-2130</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-size:10pt; font-family:Arial; text-align:center">Cell: 650-833-9394</span></div>
</div>
</div>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Paul Harwood <runette@gmail.com><br>
<b>Sent:</b> Wednesday, December 2, 2020 2:31 AM<br>
<b>To:</b> Andrew C Aitchison <andrew@aitchison.me.uk><br>
<b>Cc:</b> Brandon Biggs <brandon.biggs@ski.org>; gdal-dev@lists.osgeo.org <gdal-dev@lists.osgeo.org><br>
<b>Subject:</b> Re: [gdal-dev] Converting OBJ to Geojson files with ogr2ogr</font>
<div> </div>
</div>
<div>
<div dir="ltr">.OBJ is a simple object mesh (or to put it in more traditional terms: TIN) - it has shape but no data values and is not geolocated.
<div><br>
</div>
<div>I don't think there is any driver for OGR that will read .OBJ.<br>
<br>
You are going to problems with geolocation if you write your own. Geojson requires that the geometries are geolocated - and in the current version that they are in epsg:4326. That is not totally impossible - people have been using .dxf files for gis data for decades and
that format is also not in theory geolocated. It is not a trivial problem though.<br>
<br>
I guess I would ask the usual question .. why?<br>
<br>
</div>
<div>- what are you actually trying to achieve and why a GIS format like GeoJSON?<br>
</div>
<div>- If you have to use GeoJSON - I am guessing you are transferring some data to something that reads GeoJSON only? In that case - can your source produce .dxf? OGR can read .dxf.<br>
<br>
- If you only have the source in .OBJ - what other formats can the destination read? Although, if you only have the source in .obj, I very much doubt any of the GIS tools like GDAL are going to be able to help you. It just is not a format used in GIS.<br>
<br>
It is a problem we solved in the <a href="http://www.virgis.org">ViRGiS projec</a>t - since .obj is used a lot in VR. There we used an existing library to read the .obj files - but that is in C# and I doubt that would help you.</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, 1 Dec 2020 at 20:15, Andrew C Aitchison <<a href="mailto:andrew@aitchison.me.uk">andrew@aitchison.me.uk</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
On Tue, 1 Dec 2020, Brandon Biggs wrote:<br>
<br>
> Hello,<br>
> I am wondering how to convert an obj file to a geojson file? I am using ogr2ogr with the command:<br>
> Ogr2ogr -f geojson output.geojson input.obj<br>
> But get the error that ogr2ogr does not have an OBJ driver. I looked on:<br>
> the vector drivers page<<a href="https://gdal.org/drivers/vector/index.html" rel="noreferrer" target="_blank">https://gdal.org/drivers/vector/index.html</a>><br>
> but am unable to find a simple obj converter. I am wondering if there is such a thing? I am probably going to write my own that does what I want, because OBJ is so simple, I was just wondering if GDAL could already do it.<br>
<br>
I've never heard of OBJ, but that doesn't mean much.<br>
<br>
If you only want a read-only ogr driver you might want to look at<br>
<a href="https://gdal.org/tutorials/vector_python_driver.html" rel="noreferrer" target="_blank">
https://gdal.org/tutorials/vector_python_driver.html</a><br>
if you would find a quick-n-dirty python quicker to write than C++.<br>
<br>
-- <br>
Andrew C. Aitchison Kendal, UK<br>
<a href="mailto:andrew@aitchison.me.uk" target="_blank">andrew@aitchison.me.uk</a><br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote>
</div>
</div>
</div>
</body>
</html>