How to converting geotif file to png file for the given lat,long values using postgres sql

7 views
Skip to first unread message

Amith Patil

unread,
Jan 17, 2020, 6:00:03 AM1/17/20
to sqlalchemy
Hi,

I have a scenario where i have to download the tif file from server and store it in the postgres DB as png with the given lat,long values.

Anyone has any idea on how to proceed? Im doing this for the first time, hence i have very limited knowledge on this.

Thanks in advance.

Thanks,
Amith

Simon King

unread,
Jan 17, 2020, 9:13:45 AM1/17/20
to sqlal...@googlegroups.com
On Fri, Jan 17, 2020 at 11:00 AM Amith Patil <amitn...@gmail.com> wrote:
>
> Hi,
>
> I have a scenario where i have to download the tif file from server and store it in the postgres DB as png with the given lat,long values.
>
> Anyone has any idea on how to proceed? Im doing this for the first time, hence i have very limited knowledge on this.
>

Unfortunately that's a very wide question with no short answer. For
example, do you need help with downloading files from a server,
converting TIF to PNG, reading lat/long from GeoTIFF? This isn't
really the mailing list to help you with any of that.

Do you have an existing database that you want to put this data into,
or are you designing a new database? If it's the latter, then the
table structure will depend on how you are going to use the data
afterwards. If you're going to be querying by lat/long values, you may
want to use the postgis extensions for geographic data types.

SQLAlchemy can help you with inserting binary data into a database
table (eg. by using the LargeBinary column data type). If you haven't
done anything like this before, you could perhaps start by following
the tutorial at https://docs.sqlalchemy.org/en/13/orm/tutorial.html.
Then try adding a LargeBinary column to the User table and store some
binary data in it.

Hope that helps,

Simon
Reply all
Reply to author
Forward
0 new messages