It is relatively simple CoordinateReferenceSystem crs = ... Projection projection = crs.getProjection(); ProjCoordinate latLng = new ProjCoordinate(45, 35); ProjCoordinate projected = new ProjCoordinate(); projection.transform(latLng, projected); ...

java,coordinate-systems,geotools

Have a look at : http://docs.geotools.org/latest/userguide/library/referencing/crs.html In section "Finding a Math Transform", there is an example with Albers_Conic_Equal_Area projection involved. You can use another output from an external tool to check if your calculation is correct. Here is one you can use online by moving the map: http://spatialreference.org/ref/epsg/nad83-bc-albers/...

php,mkmapview,latitude-longitude,coordinate-systems

My Solution $top = $c_lat + ($d_lat / 2.0); $bottom = $c_lat - ($d_lat / 2.0); $left = $c_lon - ($d_lon / 2.0); $right = $c_lon + ($d_lon / 2.0); if($left < -180) { $second_left = $left + 360.0; $second_right = 180.0; $left = -180; } elseif($right > 180) {...

java,transformation,gdal,coordinate-systems

I tried executing your source code and I got the error Native library load failed. java.lang.UnsatisfiedLinkError: no osrjni in java.library.path So just adding gdal.jar in your project build path is not sufficient for executing your program. There are some external native library dependencies. Check out this link,https://trac.osgeo.org/gdal/ticket/3598. Here it is...

camera,three.js,coordinate-systems

This should work: camera.rotateY( angle ); ...

android,android-camera,android-canvas,android-custom-view,coordinate-systems

The Camera.Face class returns the face bound coordinates using the image frame that the phone would save into its internal storage, rather than using the image displayed in the Camera Preview. In my case, the images were saved in a different manner from the camera, resulting in a incorrect mapping....

image,matlab,image-processing,matlab-figure,coordinate-systems

I found a solution , please feel free to check it for fun :) I = imread('cameraman.tif'); Im1 = imrotate(I,-45); % Image imrotated with loose option Im2 = imrotate(I,-45,'nearest','crop');% Image imrotated with crop option % draw image 1 loose figure(1); subplot(2,1,1), imagesc(Im1), axis image; drawnow; %%Get a point title('Select a...

OpenGL's window space is always defined to have the origin at bottom left corner. Using some projection matrix will not flip this. It will only add a mirroring component to the transformation from eye to clip space (where later window coords are derived from). So if you feed gluUnporject with...

java,canvas,javafx,coordinates,coordinate-systems

// calc the deltas as next minus current double delta_x = next.xPos - current.xPos; double delta_y = next.yPos - current.yPos; // Calc the angle IN RADIANS using the atan2 double theta = Math.atan2(delta_y, delta_x); // this.angle is now in degrees // or leave off *180/Math.PI if you want radians this.angle...

c,2d,coordinates,ncurses,coordinate-systems

The x and y coordinates in curses are as you expect: x is the horizontal coordinate, corresponding to columns. y is the vertical coordinate, cooresponding to rows. But in curses, these coordinates are usually given in the order y, x. For example, the prototype to mfprintw mentioned in your code...

postgresql,postgis,coordinate-systems

You have to assign a CRS via Srid to the gps data (I assume they are in WGS84, thus srid 4326), then cast them to geography to enable setting the buffer radiae in meters, and cast them back to geometry for the st_contains function to work Query: SELECT ST_Contains(bigc::geometry,smallc::geometry) as...

opengl,coordinate-systems,rotational-matrices

The OpenGL modelview matrix works as a stack. Every transformation is performed by post-multiplying the transformation with the current MVM matrix. In other words, it looks like this: New_MVM = Old_MVM * Transformation This causes the transformations to always occur in the local coordinate system. As the article states, you...

map,coordinates,coordinate-systems,openlayers-3

If you have a coordinate [lon, lat] (in that order) you can transform it using: var newCoord = ol.project.transform([lon, lat], 'EPSG:4326', 'EPSG:3857'); ...

python,math,matplotlib,coordinate-systems

Your ellipsoid is not just an ellipsoid, it's a sphere. Notice that if you use the substitution formulas written below for x, y and z, you'll get an identity. It is in general easier to plot such a surface of revolution in a different coordinate system (spherical in this case),...

python,linear-algebra,coordinate-systems,coordinate-transformation,homogenous-transformation

Six points alone is not enough to uniquely determine the affine transformation. However, based on what you had asked in a question earlier (shortly before it was deleted) as well as your comment, it would seem that you are not merely looking for an affine transformation, but a homogeneous affine...

algorithm,coordinates,coordinate-systems,coordinate

So here's my question: does this algorithm exists already? Has it a name? This mapping is called the Z-order curve or Morton code: In mathematical analysis and computer science, Z-order, Morton order, or Morton code is a function which maps multidimensional data to one dimension while preserving locality of...

c#,selection,picturebox,coordinate-systems

Here is an example that draws the second rectangle right along as you draw the first one..: Point mDown = Point.Empty; Point mCurr = Point.Empty; private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { mDown = e.Location; } private void pictureBox1_MouseMove(object sender, MouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Left) { mCurr =...

objective-c,swift,sprite-kit,coordinates,coordinate-systems

In UIView coordinates, y = 0 at the top of the screen, and y increases as you go down. In SpriteKit coordinates, y increases as you go up.

geometry,coordinate-systems,divide-by-zero

When you calculate center point of an arc that is passing through 3 points, you definitely need to check if these points lies on the same line. But rewrite expression if (py2-py1)/(px2-px1) = (py3-py2)/(px3-px2) to avoid dividing Det = (py2-py1) * (px3-px2) - (py3-py2) * (px2-px1) if Det = 0...

java,cryptography,coordinates,coordinate-systems,elliptic-curve

The implementation above is correct there was an error in the Jacobian class (in the constructor) which update Z two times with a wrong value.

ios,uikit,sprite-kit,coordinate-systems

According to the docs, SKView has methods for Converting Between View and Scene Coordinates. Remember the scene is itself an SKNode, so if you need to get from scene coordinates to a particular node coordinate system there's also the methods in Converting to and from the Node’s Coordinate System....

matlab,computer-vision,coordinate-systems,camera-calibration,matlab-cvst

RotationOfCamera2 and TranslationOfCamera2 describe the transformation from camera1's coordinates into camera2's coordinates. A camera's coordinate system has its origin at the camera's optical center. Its X and Y-axes are in the image plane, and its Z-axis points out along the optical axis. Equivalently, the extrinsics of camera 1 are identity...

javascript,math,coordinates,coordinate-systems

I think the OP is trying to project the point C onto the line passing thru point B and is perpendicular to line AB. If this is the case, the math for the projection is not correct. You can find the projected point D as D= C - dot(vec(BC), vec(AB))...

ios,coordinate-systems,cgpoint,icarousel,coordinate-transformation

I have found a solution but in my particular case it looks awful. I need to move along y only so on each drag position changed event: CGFloat newY = currentTouchPosition.y - positionOnTouchStartDragging.y + (draggedPageIndex - carousel.scrollOffset) * spacing * carousel.bounds.size.height; CGFloat delta = self.bounds.size.height * spacing; CATransform3D result =...

3d,rotation,geometry,coordinate-systems,euler-angles

Notation: x,y,z - old system basis x',y',z' - new system basis Transformation between systems: x' = x y' = y z' = -z Euler angles: EulerXYZ = (alfa,beta,gamma) EulerXYZ' = (alfa',beta',gamma') = ? Now I can think of two ways to solve it: Graphically Draw both systems Mark positive rotation...

offsetX/offsetY are a neat extension by Microsoft to mouse event objects, and mean the position of the mouse pointer relatively to the target element. Sadly, they're not implemented by Firefox, and there's discordance among the other browsers about what should be the origin point: IE thinks it's the content box,...

c#,forms,winapi,properties,coordinate-systems

Actually it was a bit of a mess getting it to work. When the App starts you need to SetWindowPos without the SWP_NOMOVE flag Then SetWindowPos with the SWP_MOVE Flag set Then when you want to change the position repeat the App start process....

c++,gdal,coordinate-systems,mingw-w64

The problem is that you need to swap your axis order to use Cartesian X/Y space or Lon/Lat, and not "Lat/Lon" order. Setting this should work. double x = -45.49159617; // Lon double y = -23.57014667; // Lat The difference you saw from your round-trip conversion was from projecting outside...

By flipping around the y-axis you flipped the chirality of the world space. Which means that the winding of your faces comes out differently. CCW becomes CW and vice versa. Most likely you have face culling enabled, so to account for the chirality flip you have to swap CCW for...

java,javascript,coordinate-systems,wgs84,proj4js

You can check this repository and extract what you need: https://github.com/dsegerss/Sonardrone/tree/master/src/org/sonardrone/proj/positions...

matlab,geometry,coordinate-systems

You could first make the coordinates going outwards from P0 and then rotate the coordinates using a rotation matrix. So you take points P for all R's and thetas, as MBo pointed out: P = [ P0x + R * cos(theta); P0y + R * sin(theta); 0 ] Then you...