[Qgis-developer] Problem in shapefiles rendering

Martin Dobias wonder.sk at gmail.com
Sat Jun 21 07:04:43 EDT 2008

On Thu, Jun 19, 2008 at 6:43 AM, bargi john <bargi1981 at gmail.com> wrote:
> Hi Martin,
> Thanks for reply......
> Actually the application I am working on is similar to QGIS in which
> shapefiles are rendered using QT.
> In between, I researched on the problem and find out that this issue is
> related to QGraphicsView architecture.
> In essence, when QGraphicsView is created , it create with origin(0,0) at
> top left corner. Due to which the positive quadrant is downwards  and
> negative upwards ( What I think ) due to which when shapefiles are rendered
> according the coordinates position they draw in downward direction( because
> coordinates of shapefiles are positive) and they appear to inverted.I found
> scaling as a clutch which invert the the GraphicsView and line and polygon
> shapefiles are drawn properly but it invert the point shapefile.
> Due to this I reached to the possible solution that can be applied on
> application:-
> --- One way can be that we create the QGraphicsView with origin(0,0) at
> bottom left corner.Due to this we will get the proper coordinate system for
> rendering. I have tried on it but not able to find the sol. how it will be
> implemented.

Actually, coordinates can be both positive and negative: with
unprojected coordinates on earth:
- x in range [-180, 180]
- y in range [-90,90]

northern hemisphere: y positive
eastern hemisphere: x positive

But in case you have to transform just of some data, it's possible
that your data might be incorrect.


More information about the Qgis-developer mailing list