Quantcast

Bounding Box form center using lat long and meters.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Bounding Box form center using lat long and meters.

Chris B-2
I'm wanting to be able to generate the bounding cords from the data, I've tried to figure out the query but haven't had much luck using PostGIS. 
The center coordinates of the image is 35.1495343, -90.0490665 lat long The box should be 180 Meters wide and 135 Meters high my Heading is 12 Degrees.
Image width and height are as follows if its needed 4000 W, 3000 H. If something else would be more suitable like gdal please let me know. 
I want to "automate" the geo-referencing on these single images with out using something like QGIS" where I can use it in mapbox.
  "overlay": {
            "type": "image",
            "url": "https://www.mapbox.com/mapbox-gl-js/assets/radar.gif",
            "coordinates": [
                [-80.425, 46.437],
                [-71.516, 46.437],
                [-71.516, 37.936],
                [-80.425, 37.936]
            ]
        }

_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bounding Box form center using lat long and meters.

Andy Colson
On 11/26/2016 09:00 AM, Chris wrote:
> I'm wanting to be able to generate the bounding cords from the data, I've tried to figure out the query but haven't had much luck using PostGIS.
> The center coordinates of the image is 35.1495343, -90.0490665 lat long The box should be 180 Meters wide and 135 Meters high my Heading is 12 Degrees.
> Image width and height are as follows if its needed 4000 W, 3000 H. If something else would be more suitable like gdal please let me know.
> I want to "automate" the geo-referencing on these single images with out using something like QGIS" where I can use it in mapbox.
>
> |"overlay": { "type": "image", "url": "https://www.mapbox.com/mapbox-gl-js/assets/radar.gif", "coordinates": [ [-80.425, 46.437], [-71.516, 46.437], [-71.516, 37.936], [-80.425, 37.936] ] }|
>
>

So you are looking for some sql to generate a 180x135 box around a give center point?

-Andy

_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bounding Box form center using lat long and meters.

Chris B-2
Yes, I'm not sure if I need to be true north all the times or not,
since this is a image i'm overlaying is there a way to calculate the
heading into the sql query so if its 12 degrees heading from north its
accounted for?
or should I shoot all my photos at 0 degrees north.

On Sun, Nov 27, 2016 at 8:46 AM, Andy Colson <[hidden email]> wrote:

> On 11/26/2016 09:00 AM, Chris wrote:
>>
>> I'm wanting to be able to generate the bounding cords from the data, I've
>> tried to figure out the query but haven't had much luck using PostGIS.
>> The center coordinates of the image is 35.1495343, -90.0490665 lat long
>> The box should be 180 Meters wide and 135 Meters high my Heading is 12
>> Degrees.
>> Image width and height are as follows if its needed 4000 W, 3000 H. If
>> something else would be more suitable like gdal please let me know.
>> I want to "automate" the geo-referencing on these single images with out
>> using something like QGIS" where I can use it in mapbox.
>>
>> |"overlay": { "type": "image", "url":
>> "https://www.mapbox.com/mapbox-gl-js/assets/radar.gif", "coordinates": [
>> [-80.425, 46.437], [-71.516, 46.437], [-71.516, 37.936], [-80.425, 37.936] ]
>> }|
>>
>>
>
> So you are looking for some sql to generate a 180x135 box around a give
> center point?
>
> -Andy
>
> _______________________________________________
> postgis-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bounding Box form center using lat long and meters.

Andy Colson
On 11/27/2016 09:09 AM, Chris wrote:

> Yes, I'm not sure if I need to be true north all the times or not,
> since this is a image i'm overlaying is there a way to calculate the
> heading into the sql query so if its 12 degrees heading from north its
> accounted for?
> or should I shoot all my photos at 0 degrees north.
>
> On Sun, Nov 27, 2016 at 8:46 AM, Andy Colson <[hidden email]> wrote:
>> On 11/26/2016 09:00 AM, Chris wrote:
>>>
>>> I'm wanting to be able to generate the bounding cords from the data, I've
>>> tried to figure out the query but haven't had much luck using PostGIS.
>>> The center coordinates of the image is 35.1495343, -90.0490665 lat long
>>> The box should be 180 Meters wide and 135 Meters high my Heading is 12
>>> Degrees.
>>> Image width and height are as follows if its needed 4000 W, 3000 H. If
>>> something else would be more suitable like gdal please let me know.
>>> I want to "automate" the geo-referencing on these single images with out
>>> using something like QGIS" where I can use it in mapbox.
>>>
>>> |"overlay": { "type": "image", "url":
>>> "https://www.mapbox.com/mapbox-gl-js/assets/radar.gif", "coordinates": [
>>> [-80.425, 46.437], [-71.516, 46.437], [-71.516, 37.936], [-80.425, 37.936] ]
>>> }|
>>>
>>>
>>
>> So you are looking for some sql to generate a 180x135 box around a give
>> center point?
>>
>> -Andy
>>
>> _______________________________________________
>> postgis-users mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/postgis-users
>

As long as your happy with it being extended from the center point, I think a combination of http://postgis.net/docs/ST_Extent.html and http://postgis.net/docs/ST_Rotate.html should get you what you want.

-Andy
_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bounding Box form center using lat long and meters.

Chris B-2
In reply to this post by Chris B-2
Trying to figure out the query can you help me with a example? I'm not able to come up with anything just say buffer all sides of the rectangle by 180meters.


On Saturday, November 26, 2016 at 9:00:23 AM UTC-6, Chris wrote:
I'm wanting to be able to generate the bounding cords from the data, I've tried to figure out the query but haven't had much luck using PostGIS. 
The center coordinates of the image is 35.1495343, -90.0490665 lat long The box should be 180 Meters wide and 135 Meters high my Heading is 12 Degrees.
Image width and height are as follows if its needed 4000 W, 3000 H. If something else would be more suitable like gdal please let me know. 
I want to "automate" the geo-referencing on these single images with out using something like QGIS" where I can use it in mapbox.
  "overlay": {
            "type": "image",
            "url": "<a href="https://www.mapbox.com/mapbox-gl-js/assets/radar.gif" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.mapbox.com%2Fmapbox-gl-js%2Fassets%2Fradar.gif\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGKXjn3JdEpHWA8LwHQYgy2HVQVaA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.mapbox.com%2Fmapbox-gl-js%2Fassets%2Fradar.gif\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGKXjn3JdEpHWA8LwHQYgy2HVQVaA&#39;;return true;">https://www.mapbox.com/mapbox-gl-js/assets/radar.gif",
            "coordinates": [
                [-80.425, 46.437],
                [-71.516, 46.437],
                [-71.516, 37.936],
                [-80.425, 37.936]
            ]
        }

_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bounding Box form center using lat long and meters.

Chris B-2
In reply to this post by Chris B-2
 SELECT ST_AsEWKT(ST_Expand(ST_GeomFromEWKT('SRID=4326;POINT(-88.33 36.33)'),100));
I don't think something is right want max and min lat long of the 100 meter buffer.

On Saturday, November 26, 2016 at 9:00:23 AM UTC-6, Chris wrote:
I'm wanting to be able to generate the bounding cords from the data, I've tried to figure out the query but haven't had much luck using PostGIS. 
The center coordinates of the image is 35.1495343, -90.0490665 lat long The box should be 180 Meters wide and 135 Meters high my Heading is 12 Degrees.
Image width and height are as follows if its needed 4000 W, 3000 H. If something else would be more suitable like gdal please let me know. 
I want to "automate" the geo-referencing on these single images with out using something like QGIS" where I can use it in mapbox.
  "overlay": {
            "type": "image",
            "url": "<a href="https://www.mapbox.com/mapbox-gl-js/assets/radar.gif" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.mapbox.com%2Fmapbox-gl-js%2Fassets%2Fradar.gif\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGKXjn3JdEpHWA8LwHQYgy2HVQVaA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.mapbox.com%2Fmapbox-gl-js%2Fassets%2Fradar.gif\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGKXjn3JdEpHWA8LwHQYgy2HVQVaA&#39;;return true;">https://www.mapbox.com/mapbox-gl-js/assets/radar.gif",
            "coordinates": [
                [-80.425, 46.437],
                [-71.516, 46.437],
                [-71.516, 37.936],
                [-80.425, 37.936]
            ]
        }

_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bounding Box form center using lat long and meters.

Chris B-2
http://gis.stackexchange.com/questions/29337/creating-square-buffer-around-point-feature-using-arcgis-for-desktop
#5 graphically depicts what I'm wanting to do. I need the "coordinates": [
                [-80.425, 46.437],
                [-71.516, 46.437],
                [-71.516, 37.936],
                [-80.425, 37.936] 
to add it to the map.

On Tuesday, November 29, 2016 at 1:51:55 AM UTC-6, Chris wrote:
 SELECT ST_AsEWKT(ST_Expand(ST_GeomFromEWKT('SRID=4326;POINT(-88.33 36.33)'),100));
I don't think something is right want max and min lat long of the 100 meter buffer.

On Saturday, November 26, 2016 at 9:00:23 AM UTC-6, Chris wrote:
I'm wanting to be able to generate the bounding cords from the data, I've tried to figure out the query but haven't had much luck using PostGIS. 
The center coordinates of the image is 35.1495343, -90.0490665 lat long The box should be 180 Meters wide and 135 Meters high my Heading is 12 Degrees.
Image width and height are as follows if its needed 4000 W, 3000 H. If something else would be more suitable like gdal please let me know. 
I want to "automate" the geo-referencing on these single images with out using something like QGIS" where I can use it in mapbox.
  "overlay": {
            "type": "image",
            "url": "<a href="https://www.mapbox.com/mapbox-gl-js/assets/radar.gif" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.mapbox.com%2Fmapbox-gl-js%2Fassets%2Fradar.gif\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGKXjn3JdEpHWA8LwHQYgy2HVQVaA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.mapbox.com%2Fmapbox-gl-js%2Fassets%2Fradar.gif\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGKXjn3JdEpHWA8LwHQYgy2HVQVaA&#39;;return true;">https://www.mapbox.com/mapbox-gl-js/assets/radar.gif",
            "coordinates": [
                [-80.425, 46.437],
                [-71.516, 46.437],
                [-71.516, 37.936],
                [-80.425, 37.936]
            ]
        }

_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Loading...