Обсуждение: Implement geospatial data viewer in pgAdmin4 for PostGIS

Поиск
Список
Период
Сортировка

Implement geospatial data viewer in pgAdmin4 for PostGIS

От
Xuri Gong
Дата:
Hi Dave/Team,

My name is Xuri Gong. I am working on implementing geospatial data viewer in pgAdmin4.

I wrote a design document for the viewer[1] according to the related issue[2] and I am wondering if it is a proper design. It would be great if there are any suggestions.

I have read the #pgAdmin Project Contributions# doc[3]. Is there any other instruction or standard that is needed to learn?


Regards,
Xuri Gong

Re: Implement geospatial data viewer in pgAdmin4 for PostGIS

От
Joao De Almeida Pereira
Дата:
Hello Xuri,
Welcome to the pgadmin project.

Let us give you some guidelines/pointers to help you out starting.
As a general rule of thumb all the new development should be done in a separate file that contain the functionality itself.
For Javascript,
- Has you might have notice we started some time ago the migration from RequireJS into Webpack and ES6 for a more standardized way to develop and we are trying no to touch the files are not ported yet.
You will need to connect the new functionality and will need to change these files, but for that we would advise you to do something similar to some code we have in SQLEditor:
_show_filter: function() {
let self = this;
FilterHandler.dialog(self);
},
- Create tests around your functionality
- If you are developing a panel like the History one in SQLEditor, do you tthink you can use React to do it? History is an example of that
- We use ESLinter + Jasmine + Karma for linting and testing the javascript side, be sure to run these before sending a patch

For Python:
- As advised in the Javascript part we are trying not to increase the length of the current files as much as possible, so develop you backend in a separate file(s) and then integrate them as normal classes of functions in Python
- We use pycodestyle + Unittest for testing and linting, be sure to run these before sending a patch
- Add tests around your functionality


If you need some more pointer or help in something let us know.

Thanks
Joao

On Wed, May 23, 2018 at 8:23 AM Xuri Gong <xurigoong@gmail.com> wrote:
Hi Dave/Team,

My name is Xuri Gong. I am working on implementing geospatial data viewer in pgAdmin4.

I wrote a design document for the viewer[1] according to the related issue[2] and I am wondering if it is a proper design. It would be great if there are any suggestions.

I have read the #pgAdmin Project Contributions# doc[3]. Is there any other instruction or standard that is needed to learn?


Regards,
Xuri Gong

Re: Implement geospatial data viewer in pgAdmin4 for PostGIS

От
Xuri Gong
Дата:
Hi Joao,
Thank you very much for these detailed guidelines.

I will follow these standards and test both JavaScript and Python code before sending a patch. For the new panel, I am learning React these days and will spend three months implementing this viewer so I think I can do it. 

Thanks.

Re: Implement geospatial data viewer in pgAdmin4 for PostGIS

От
Dave Page
Дата:
Hi

On Wed, May 23, 2018 at 1:23 PM, Xuri Gong <xurigoong@gmail.com> wrote:
Hi Dave/Team,

My name is Xuri Gong. I am working on implementing geospatial data viewer in pgAdmin4.

I wrote a design document for the viewer[1] according to the related issue[2] and I am wondering if it is a proper design. It would be great if there are any suggestions.

I have read the #pgAdmin Project Contributions# doc[3]. Is there any other instruction or standard that is needed to learn?


I think before thinking about rendering an entire dataset, we should add a visualiser to the data grid so at least the user can see individual shapes etc. This would be similar to what we've considered doing if we detect an image in a bytea column for example - render a "View" button or link in the cell, that when clicked, opens the image in a popup panel.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Implement geospatial data viewer in pgAdmin4 for PostGIS

От
Xuri Gong
Дата:
Hi Dave,

Thank you very much for your feedback.

That's a good idea to see individual images. But in my opinion, for geometry data, user often tend to see not only the individual shapes, but also the locations, spatial relations and distribution in a map. For example, if the geometries are all points, displaying the single point won't show much information. 

So I think rendering the output geometry data in map is necessary. If the user want to see the shape of a single geometry, he/she can select the related row in the data grid, then the viewer can highlight the geometry in the map.

Thank you for your suggestion and please let me know if you want to discuss this matter further.

Regards,
Xuri

Re: Implement geospatial data viewer in pgAdmin4 for PostGIS

От
Dave Page
Дата:
Hi

On Fri, May 25, 2018 at 5:00 AM, Xuri Gong <xurigoong@gmail.com> wrote:
Hi Dave,

Thank you very much for your feedback.

That's a good idea to see individual images. But in my opinion, for geometry data, user often tend to see not only the individual shapes, but also the locations, spatial relations and distribution in a map. For example, if the geometries are all points, displaying the single point won't show much information. 

Sure - but if they're a bunch of polygons, it might be more interesting.
 

So I think rendering the output geometry data in map is necessary. If the user want to see the shape of a single geometry, he/she can select the related row in the data grid, then the viewer can highlight the geometry in the map.

I agree the map is the ultimate tool. However, I do think that being able to quickly view a single geometry from within the grid makes a lot of sense - and for users who want to easily visualise a single geometry, will be a great deal more convenient than the map.

Note that I'm not talking about anything complex here - just a convenience panel that renders the geometry, and maybe has zoom and scrolling. The viewing tab would be where the real magic happens - handling the map overlay and the ability to display many geometries at once.



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Implement geospatial data viewer in pgAdmin4 for PostGIS

От
Anthony DeBarros
Дата:
I agree the map is the ultimate tool. However, I do think that being able to quickly view a single geometry from within the grid makes a lot of sense - and for users who want to easily visualise a single geometry, will be a great deal more convenient than the map.

Note that I'm not talking about anything complex here - just a convenience panel that renders the geometry, and maybe has zoom and scrolling. The viewing tab would be where the real magic happens - handling the map overlay and the ability to display many geometries at once.


As a user, I would agree with Dave here. A good example is a table that holds the polygons of each county in the U.S. or each country in Europe. It would be very helpful to view each individually as well as collectively if I were to select all in a query.
 

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Implement geospatial data viewer in pgAdmin4 for PostGIS

От
Xuri Gong
Дата:
Hi Anthony and Dave,

Thank you for your suggestions and I have implemented this visualiser:). I add button in the cell and when it's clicked the geometry is shown in a map. Here is the screenshots of it: https://photos.app.goo.gl/fQVBRcmZJ3YcPLcL8

Attached is the patch for this geometry viewer. Please review it. Thank you.

Anthony DeBarros <adebarros@gmail.com> 于2018年5月26日周六 上午12:47写道:
I agree the map is the ultimate tool. However, I do think that being able to quickly view a single geometry from within the grid makes a lot of sense - and for users who want to easily visualise a single geometry, will be a great deal more convenient than the map.

Note that I'm not talking about anything complex here - just a convenience panel that renders the geometry, and maybe has zoom and scrolling. The viewing tab would be where the real magic happens - handling the map overlay and the ability to display many geometries at once.


As a user, I would agree with Dave here. A good example is a table that holds the polygons of each county in the U.S. or each country in Europe. It would be very helpful to view each individually as well as collectively if I were to select all in a query.
 

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Вложения

Re: Implement geospatial data viewer in pgAdmin4 for PostGIS

От
Dave Page
Дата:
Hi

Can you suggest any freely available data sets that can be used to test this with please? I don't have any geo databases.

As a quick review-point, I don't see any documentation updates with the patch.

Thanks.

On Wed, Jul 25, 2018 at 9:13 AM, Xuri Gong <xurigoong@gmail.com> wrote:
Hi Anthony and Dave,

Thank you for your suggestions and I have implemented this visualiser:). I add button in the cell and when it's clicked the geometry is shown in a map. Here is the screenshots of it: https://photos.app.goo.gl/fQVBRcmZJ3YcPLcL8

Attached is the patch for this geometry viewer. Please review it. Thank you.

Anthony DeBarros <adebarros@gmail.com> 于2018年5月26日周六 上午12:47写道:
I agree the map is the ultimate tool. However, I do think that being able to quickly view a single geometry from within the grid makes a lot of sense - and for users who want to easily visualise a single geometry, will be a great deal more convenient than the map.

Note that I'm not talking about anything complex here - just a convenience panel that renders the geometry, and maybe has zoom and scrolling. The viewing tab would be where the real magic happens - handling the map overlay and the ability to display many geometries at once.


As a user, I would agree with Dave here. A good example is a table that holds the polygons of each county in the U.S. or each country in Europe. It would be very helpful to view each individually as well as collectively if I were to select all in a query.
 

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Implement geospatial data viewer in pgAdmin4 for PostGIS

От
Xuri Gong
Дата:
Hi Dave,

I have sent the new patch in a new thread because I thought you have missed this email... So please just ignore this patch and review the new patch. I also added some test geo data in the new thread. You can add postGIS extension and then import the data. 

If you just want to have a quick look, I also build pgAdmin4 and import the data on my server. You can login and have a look: http://pgadmin4.gooong.cn:5050 . The username is my email address and password is postgis_test .

I will add documentation for the viewer in the new thread.

Dave Page <dpage@pgadmin.org> 于2018年8月2日周四 下午4:35写道:
Hi

Can you suggest any freely available data sets that can be used to test this with please? I don't have any geo databases.

As a quick review-point, I don't see any documentation updates with the patch.

Thanks.

On Wed, Jul 25, 2018 at 9:13 AM, Xuri Gong <xurigoong@gmail.com> wrote:
Hi Anthony and Dave,

Thank you for your suggestions and I have implemented this visualiser:). I add button in the cell and when it's clicked the geometry is shown in a map. Here is the screenshots of it: https://photos.app.goo.gl/fQVBRcmZJ3YcPLcL8

Attached is the patch for this geometry viewer. Please review it. Thank you.

Anthony DeBarros <adebarros@gmail.com> 于2018年5月26日周六 上午12:47写道:
I agree the map is the ultimate tool. However, I do think that being able to quickly view a single geometry from within the grid makes a lot of sense - and for users who want to easily visualise a single geometry, will be a great deal more convenient than the map.

Note that I'm not talking about anything complex here - just a convenience panel that renders the geometry, and maybe has zoom and scrolling. The viewing tab would be where the real magic happens - handling the map overlay and the ability to display many geometries at once.


As a user, I would agree with Dave here. A good example is a table that holds the polygons of each county in the U.S. or each country in Europe. It would be very helpful to view each individually as well as collectively if I were to select all in a query.
 

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Implement geospatial data viewer in pgAdmin4 for PostGIS

От
Dave Page
Дата:
Hi

On Thu, Aug 2, 2018 at 10:30 AM, Xuri Gong <xurigoong@gmail.com> wrote:
Hi Dave,

I have sent the new patch in a new thread because I thought you have missed this email... So please just ignore this patch and review the new patch. I also added some test geo data in the new thread. You can add postGIS extension and then import the data. 

No - I just got back from vacation so am working my way through a large backlog. I'll look at the newer patch, but it might not be for a couple of days.

Thanks!
 

If you just want to have a quick look, I also build pgAdmin4 and import the data on my server. You can login and have a look: http://pgadmin4.gooong.cn:5050 . The username is my email address and password is postgis_test .

I will add documentation for the viewer in the new thread.

Dave Page <dpage@pgadmin.org> 于2018年8月2日周四 下午4:35写道:
Hi

Can you suggest any freely available data sets that can be used to test this with please? I don't have any geo databases.

As a quick review-point, I don't see any documentation updates with the patch.

Thanks.

On Wed, Jul 25, 2018 at 9:13 AM, Xuri Gong <xurigoong@gmail.com> wrote:
Hi Anthony and Dave,

Thank you for your suggestions and I have implemented this visualiser:). I add button in the cell and when it's clicked the geometry is shown in a map. Here is the screenshots of it: https://photos.app.goo.gl/fQVBRcmZJ3YcPLcL8

Attached is the patch for this geometry viewer. Please review it. Thank you.

Anthony DeBarros <adebarros@gmail.com> 于2018年5月26日周六 上午12:47写道:
I agree the map is the ultimate tool. However, I do think that being able to quickly view a single geometry from within the grid makes a lot of sense - and for users who want to easily visualise a single geometry, will be a great deal more convenient than the map.

Note that I'm not talking about anything complex here - just a convenience panel that renders the geometry, and maybe has zoom and scrolling. The viewing tab would be where the real magic happens - handling the map overlay and the ability to display many geometries at once.


As a user, I would agree with Dave here. A good example is a table that holds the polygons of each county in the U.S. or each country in Europe. It would be very helpful to view each individually as well as collectively if I were to select all in a query.
 

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Implement geospatial data viewer in pgAdmin4 for PostGIS

От
Xuri Gong
Дата:
Thanks! 

Dave Page <dpage@pgadmin.org> 于2018年8月2日周四 下午5:32写道:
Hi

On Thu, Aug 2, 2018 at 10:30 AM, Xuri Gong <xurigoong@gmail.com> wrote:
Hi Dave,

I have sent the new patch in a new thread because I thought you have missed this email... So please just ignore this patch and review the new patch. I also added some test geo data in the new thread. You can add postGIS extension and then import the data. 

No - I just got back from vacation so am working my way through a large backlog. I'll look at the newer patch, but it might not be for a couple of days.

Thanks!
 

If you just want to have a quick look, I also build pgAdmin4 and import the data on my server. You can login and have a look: http://pgadmin4.gooong.cn:5050 . The username is my email address and password is postgis_test .

I will add documentation for the viewer in the new thread.

Dave Page <dpage@pgadmin.org> 于2018年8月2日周四 下午4:35写道:
Hi

Can you suggest any freely available data sets that can be used to test this with please? I don't have any geo databases.

As a quick review-point, I don't see any documentation updates with the patch.

Thanks.

On Wed, Jul 25, 2018 at 9:13 AM, Xuri Gong <xurigoong@gmail.com> wrote:
Hi Anthony and Dave,

Thank you for your suggestions and I have implemented this visualiser:). I add button in the cell and when it's clicked the geometry is shown in a map. Here is the screenshots of it: https://photos.app.goo.gl/fQVBRcmZJ3YcPLcL8

Attached is the patch for this geometry viewer. Please review it. Thank you.

Anthony DeBarros <adebarros@gmail.com> 于2018年5月26日周六 上午12:47写道:
I agree the map is the ultimate tool. However, I do think that being able to quickly view a single geometry from within the grid makes a lot of sense - and for users who want to easily visualise a single geometry, will be a great deal more convenient than the map.

Note that I'm not talking about anything complex here - just a convenience panel that renders the geometry, and maybe has zoom and scrolling. The viewing tab would be where the real magic happens - handling the map overlay and the ability to display many geometries at once.


As a user, I would agree with Dave here. A good example is a table that holds the polygons of each county in the U.S. or each country in Europe. It would be very helpful to view each individually as well as collectively if I were to select all in a query.
 

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company