I interpolated temperature data observed on an urban area formed by 12 locations. Now i would like to remove all interpolated values that are outside the shapefile layer. How can i do it? The shapefile links: https://www.dropbox.com/s/0u76k3yegvr09sx/LimiteAMG.shp?dl=0 https://www.dropbox.com/s/yxsmm3v2ey3ngsp/LimiteAMG.cpg?dl=0 https://www.dropbox.com/s/yx05n31dfkggbb6/LimiteAMG.dbf?dl=0 https://www.dropbox.com/s/a6nk0xczgjeen2d/LimiteAMG.prj?dl=0 https://www.dropbox.com/s/royw7s51n2f0a6x/LimiteAMG.qpj?dl=0 https://www.dropbox.com/s/7k44dcl1k5891qc/LimiteAMG.shx?dl=0 The Data is: Lat Lon T 0 20.8208 -103.4434 22.0 1 20.7019 -103.4728 21.9 2 20.6833 -103.3500 24.2 3 20.6280 -103.4261 NaN 4 20.7205 -103.3172 25.7 5 20.7355 -103.3782 24.0 6 20.6593 -103.4136 NaN 7 20.6740 -103.3842 25.0 8 20.7585 -103.3904 23.0 9 20.6230 -103.4265 NaN 10 20.6209 -103.5004 20.0 11 20.6758 -103.6439 26.8 12 20.7084 -103.3901 24.4 …

Member Avatar
Member Avatar
+0 forum 1

Hi All, Im still finding it hard to understand Paint method, Almost all websites i had gone thru, they are showing examples of how to use it in an applet. I just cant understand on how to use it in a GUI application by extending Jframe object. Here is one example, i want to create an oval shape Button to use it in my program. Im starting my program in this way, package painttest; import Javax.swing.*; import Java.awt.* public class PaintTest extends JFrame { private JButton oval; private static final int HEIGHT = 400; private static final int WIDTH = …

Member Avatar
Member Avatar
+0 forum 2

Hi, I can't figure how to detect collision between Ellipse2D and Rectangle2D. I have tried intersects and contains methods with and without getBounds and getBounds2D methods but nothing works. Here is some code, ball and bat are overlapped. package net.viped; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.Toolkit; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.geom.AffineTransform; import java.awt.geom.Ellipse2D; import java.awt.geom.Rectangle2D; import java.awt.geom.Ellipse2D.Double; import java.awt.image.BufferedImage; import javax.swing.JPanel; public class Board2d extends JPanel { private boolean left = false; private boolean right = false; private boolean up = false; private boolean down = false; private boolean gameOn = true; double batx = …

Member Avatar
Member Avatar
+0 forum 9

I want to add squares onto a jpanel one at a time after a delay . My program works fine until I tried to change the background color with setBackgound(). It didn't change. I worked out I have to call super.paintComponent(gr) in my paintComponent method. But when I do this and call repaint(), only the current square is displayed. The previous one's have disappeared. I know it is because repaint is displaying a whole new panel each time but why does it work when I don't call super.paintComponent(). Here is a simplified version of ghe code import java.awt.*; import javax.swing.*; …

Member Avatar
Member Avatar
+0 forum 1

Hey guys, I have a rough code here that displays a Square asterisk, Oval shaped asterisk, Arrow asterisk and a Diamond asterisk, and it displays vertically, but I cant figure out how to display my output horizontally. here's my code so far, #include<iostream> #include<conio.h> using namespace std; int main() { int i=0, j=0, NUM=3,r=0, s=0, iNUM=3, x, h, k, b; for(int col=0; col<4; col++) { cout <<endl<<endl; for(int row=0; row<4; row++) { if((col==0 || col==4-1) || (row==0) || (row ==4-1)) { cout << " * "; } else cout<<" "; } } /*Oblong*/ cout<<"\n\n"; for(x=1;x<=6;x++) { if(x==1 || x==6) { …

Member Avatar
Member Avatar
+0 forum 1

I made a creature composed of shapes in a Java Applet. I want to basically copy and paste the creature I made so I have say 7-8 copies on the same applet. but in different locations. Is there an easy way besides copying the entire code, and moving each coordinate by the same amount? Thanks

Member Avatar
Member Avatar
+0 forum 10

[B]Ok so i have a program using JFrame when ever i add more than 2 classes in the frame one disappears? How can i add more than 1 class with one of them to dissappear?[/B] [B][I][U]Tester Class[/U][/I][/B] [CODE]public class TestYourFace { public static void main(String args[]) { JFrame frame = new JFrame(); frame.setSize(850,850); frame.setTitle("Choose YOUR Features?"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Face1 Component = new Face1(); Hair1 Component2 = new Hair1(); frame.add(Component); frame.add(Component2); frame.setVisible(true); } }[/CODE] [B]Classes i want to combine under 1 Frame[/B] [B][I][U]Class1[/U][/I][/B] [CODE]public class Face1 extends JComponent { Shape Head = new Ellipse2D.Float(0, 50, 0, 150); public void paint(Graphics g) { …

Member Avatar
Member Avatar
+0 forum 2

Hi i need that when i put something like a ball in front of my webcam a square is putten around that ball and keep following it if i moved the ball i currently have no idea on how i can do this so any help whould be appreciated thank you all

Member Avatar
Member Avatar
+0 forum 2

Hello all, I'm trying to inherit a "CarPanel" I created using arrays to draw various shapes in order to make a car. Now I am trying to essentially create a subclass that inherits that class, but add a Timer Action to move the car across the screen. I got it to work for my non-array using shapes, but the shapes that use the arrays are not working. Here is my driver: [code] package drawcar; import javax.swing.*; public class DrawCar { public static void main(String[] args) { JFrame frame = new JFrame("Car"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); final MovingCar panel = new MovingCar(); frame.getContentPane().add(panel); frame.pack(); …

Member Avatar
Member Avatar
+0 forum 12

I'm trying to write a test class which shows the user the following menu and implements all options. The program should continue to run and process requests until the user chooses to exit. The program should double-check that the user really wants to exit. All input must be validated and appropriate feedback given for invalid input. I have to use an array (or ArrayList) of Shapes to hold all objects. Cannot have an array of Circle or Rectangle objects. Additionally, only option 1 can use the Circle type and only option 2 can use the Rectangle type. Options 3-5 may …

Member Avatar
Member Avatar
+0 forum 15

Basically im trying to make a game where shapes fall from the sky and the user controls the sprite to avoid them. I have it working but only with 1 block falling at a time. I am using the paint method to draw my shapes. I was wondering how to go about coding it so that it created multiple shapes, but they would be created at 1 second intervals so that there is a gap as the follow on from one another. This game is similar to "falldown" for the Iphone however the shapes come from the top. Any advice …

Member Avatar
Member Avatar
+0 forum 2

So, I need to make a program that draws a [URL="http://en.wikipedia.org/wiki/Automata_theory"]finite automata[/URL] from the input data. I had some experience with the [I]graphics.h[/I] header but as far as I know it's a Borland only header and VC++ doesn't support it. So I was wondering, is there a way to draw some simple shapes and lines on VC++, besides using OpenGL?

Member Avatar
Member Avatar
+0 forum 7

Hello there everyone. I am in need of assistance in writing a code for my program. What I have to do is write a code to generate the following: (1) * ** *** **** ***** (2) ***** **** *** ** * (3) ***** **** *** ** * (4) * ** *** **** ***** So far I was able to make a code for (1) and (2) which is: for(a=0; a<5; a++) { for(b=0; b<=a; b++) printf("*"); printf("\n"); } for(a=5; a>0; a--) { for(b=0; b<a; b++) printf("*"); printf("\n"); } Now I have been trying to write code for (3) and (4) …

Member Avatar
Member Avatar
+0 forum 5

I've been racking my brain over this for a few days now. I'm attempting to write a program in Python 3.1 / PyQt 4.7.5 that will open a Powerpoint, go through every shape on every slide, determine if it is a picture and then save that picture to the specified directory with the correct name and extension. So far everything works. The GUI is ok, the logic for my code is fine and it determines the shapes as it should... the only problem is when I try to export the shapes. When it gets to actually exporting the shapes I …

Member Avatar
Member Avatar
+0 forum 6

Hello! I need to extract a custom shape from a given image. That custom shape can be, for example, a triangle. For example, if source picture is 100px width and 100px heigth, I need to define a triangle with points: (x=0 y=0) , (x = 50, y = 50), (x = 0, y = 50) I have found many examples for extracting a rectangle and also a circle, but I need to define, by declaring manually its points, a custom shape. Any idea? Thanks in advance

Member Avatar
Member Avatar
+0 forum 2

Hi there, i have this rectangle and i want to be able to rotate this shape around another when i press a key. i have been able to make it rotate where it is. There are two problems i am having difficulties with: - I can get the shape to rotate by placing [icode]glRotatef(angle,x,y,z);[/icode] within the creation of the rectangle. This will rotate this object forever. When trying to make it rotate on keypress i do the follows: [CODE] void keyboard_s (int key, int x, int y) { switch (key) { case GLUT_KEY_LEFT: glRotatef(angle,rectangleX,rectangleY,rectangleZ); break; } }[/CODE] But i couldnt …

Member Avatar
Member Avatar
+0 forum 5

The End.